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 <andrea@softinstigate.com>
-
-
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 RequestDispatcherHandlergetInstance()PipelinedHandlergetPipedHttpHandler(ExchangeKeys.TYPE type, ExchangeKeys.METHOD method)Given a type and method, return the appropriate PipelinedHandler which can handle this requestvoidhandleRequest(io.undertow.server.HttpServerExchange exchange)Handle the request, delegating to the proper PipelinedHandlervoidputHandler(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 ExceptionHandle the request, delegating to the proper PipelinedHandler- Specified by:
handleRequestin interfaceio.undertow.server.HttpHandler- Specified by:
handleRequestin 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
-
-