Package org.restheart.handlers
Class PipelinedHandler
- java.lang.Object
-
- org.restheart.handlers.PipelinedHandler
-
- All Implemented Interfaces:
io.undertow.server.HttpHandler
- Direct Known Subclasses:
PipelinedWrappingHandler,QueryStringRebuilder
public abstract class PipelinedHandler extends Object implements io.undertow.server.HttpHandler
base class to implement a PipelinedHandler- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringCONTENT_TYPE
-
Constructor Summary
Constructors Constructor Description PipelinedHandler()Creates a default instance of PipedHttpHandler with next = nullPipelinedHandler(PipelinedHandler next)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected PipelinedHandlergetNext()abstract voidhandleRequest(io.undertow.server.HttpServerExchange exchange)protected voidnext(io.undertow.server.HttpServerExchange exchange)static PipelinedHandlerpipe(PipelinedHandler... handlers)pipes multiple PipelinedHandler in a pipelineprotected voidsetNext(PipelinedHandler next)set the next PipedHttpHandler
-
-
-
Field Detail
-
CONTENT_TYPE
protected static final String CONTENT_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PipelinedHandler
public PipelinedHandler()
Creates a default instance of PipedHttpHandler with next = null
-
PipelinedHandler
public PipelinedHandler(PipelinedHandler next)
- Parameters:
next- the next handler in this chain
-
-
Method Detail
-
handleRequest
public abstract void handleRequest(io.undertow.server.HttpServerExchange exchange) throws Exception- Specified by:
handleRequestin interfaceio.undertow.server.HttpHandler- Parameters:
exchange-- Throws:
Exception
-
getNext
protected PipelinedHandler getNext()
- Returns:
- the next PipedHttpHandler
-
setNext
protected void setNext(PipelinedHandler next)
set the next PipedHttpHandler- Parameters:
next-
-
next
protected void next(io.undertow.server.HttpServerExchange exchange) throws Exception- Throws:
Exception
-
pipe
public static PipelinedHandler pipe(PipelinedHandler... handlers)
pipes multiple PipelinedHandler in a pipeline- Parameters:
handlers-- Returns:
-
-