Package io.undertow.server.handlers
Class AttachmentHandler<T>
- java.lang.Object
-
- io.undertow.server.handlers.AttachmentHandler<T>
-
- All Implemented Interfaces:
HttpHandler
public class AttachmentHandler<T> extends Object implements HttpHandler
Handler that adds an attachment to the request- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description AttachmentHandler(AttachmentKey<T> key, HttpHandler next)
AttachmentHandler(AttachmentKey<T> key, HttpHandler next, T instance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getInstance()
HttpHandler
getNext()
void
handleRequest(HttpServerExchange exchange)
Handle the request.void
setInstance(T instance)
void
setNext(HttpHandler next)
-
-
-
Constructor Detail
-
AttachmentHandler
public AttachmentHandler(AttachmentKey<T> key, HttpHandler next, T instance)
-
AttachmentHandler
public AttachmentHandler(AttachmentKey<T> key, HttpHandler next)
-
-
Method Detail
-
handleRequest
public void handleRequest(HttpServerExchange exchange) throws Exception
Description copied from interface:HttpHandler
Handle the request.- Specified by:
handleRequest
in interfaceHttpHandler
- Parameters:
exchange
- the HTTP request/response exchange- Throws:
Exception
-
getInstance
public T getInstance()
-
setInstance
public void setInstance(T instance)
-
getNext
public HttpHandler getNext()
-
setNext
public void setNext(HttpHandler next)
-
-