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 TgetInstance()HttpHandlergetNext()voidhandleRequest(HttpServerExchange exchange)Handle the request.voidsetInstance(T instance)voidsetNext(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:HttpHandlerHandle the request.- Specified by:
handleRequestin 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)
-
-