Package org.restheart.mongodb.handlers
Class RequestDispatcherHandler
- java.lang.Object
-
- org.restheart.handlers.PipelinedHandler
-
- org.restheart.mongodb.handlers.RequestDispatcherHandler
-
- All Implemented Interfaces:
io.undertow.server.HttpHandler
public class RequestDispatcherHandler extends PipelinedHandler
- Author:
- Andrea Di Cesare <[email protected]>
-
-
Field Summary
-
Fields inherited from class org.restheart.handlers.PipelinedHandler
CONTENT_TYPE
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RequestDispatcherHandler
getInstance()
PipelinedHandler
getPipedHttpHandler(ExchangeKeys.TYPE type, ExchangeKeys.METHOD method)
Given a type and method, return the appropriate PipelinedHandler which can handle this requestvoid
handleRequest(io.undertow.server.HttpServerExchange exchange)
Handle the request, delegating to the proper PipelinedHandlervoid
putHandler(ExchangeKeys.TYPE type, ExchangeKeys.METHOD method, PipelinedHandler handler)
Given a type and method, put in a PipelinedHandler-
Methods inherited from class org.restheart.handlers.PipelinedHandler
getNext, next, pipe, setNext
-
-
-
-
Method Detail
-
getInstance
public static RequestDispatcherHandler getInstance()
- Returns:
-
handleRequest
public void handleRequest(io.undertow.server.HttpServerExchange exchange) throws Exception
Handle the request, delegating to the proper PipelinedHandler- Specified by:
handleRequest
in interfaceio.undertow.server.HttpHandler
- Specified by:
handleRequest
in classPipelinedHandler
- Parameters:
exchange
- the HttpServerExchange- Throws:
Exception
-
getPipedHttpHandler
public PipelinedHandler getPipedHttpHandler(ExchangeKeys.TYPE type, ExchangeKeys.METHOD method)
Given a type and method, return the appropriate PipelinedHandler which can handle this request- Parameters:
type
-method
-- Returns:
- the PipelinedHandler
-
putHandler
public void putHandler(ExchangeKeys.TYPE type, ExchangeKeys.METHOD method, PipelinedHandler handler)
Given a type and method, put in a PipelinedHandler- Parameters:
type
- the DB typemethod
- the HTTP methodhandler
- the PipelinedHandler
-
-