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
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
Field Summary
Fields inherited from class org.restheart.handlers.PipelinedHandler
CONTENT_TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic RequestDispatcherHandlergetPipedHttpHandler(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 PipelinedHandlerMethods inherited from class org.restheart.handlers.PipelinedHandler
getNext, next, pipe, setNext
-
Method Details
-
getInstance
- Returns:
-
handleRequest
Handle 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
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
-