Top Description Fields Constructors Methods
io.undertow.server.handlers

public Class AttachmentHandler<T>

extends Object
implements HttpHandler
Class Inheritance
All Implemented Interfaces
io.undertow.server.HttpHandler
Imports
io.undertow.Handlers, io.undertow.server.HttpHandler, .HttpServerExchange, io.undertow.util.AttachmentKey

Handler that adds an attachment to the request
Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private volatile T
private final AttachmentKey<T>
private volatile HttpHandler

Constructor Summary

AccessConstructor and Description
public
AttachmentHandler(final AttachmentKey<T> key, final HttpHandler next, final T instance)

public
AttachmentHandler(final AttachmentKey<T> key, final HttpHandler next)

Method Summary

Modifier and TypeMethod and Description
public T
public HttpHandler
public void
handleRequest(final HttpServerExchange
the HTTP request/response exchange
exchange
)

Implements io.undertow.server.HttpHandler.handleRequest.

Handle the request.

public void
setInstance(final T instance)

public void
setNext(final HttpHandler next)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

instanceback to summary
private volatile T instance
keyback to summary
private final AttachmentKey<T> key
nextback to summary
private volatile HttpHandler next

Constructor Detail

AttachmentHandlerback to summary
public AttachmentHandler(final AttachmentKey<T> key, final HttpHandler next, final T instance)
AttachmentHandlerback to summary
public AttachmentHandler(final AttachmentKey<T> key, final HttpHandler next)

Method Detail

getInstanceback to summary
public T getInstance()
getNextback to summary
public HttpHandler getNext()
handleRequestback to summary
public void handleRequest(final HttpServerExchange exchange) throws Exception

Implements io.undertow.server.HttpHandler.handleRequest.

Doc from io.undertow.server.HttpHandler.handleRequest.

Handle the request.

Parameters
exchange:HttpServerExchange

the HTTP request/response exchange

Annotations
@Override
setInstanceback to summary
public void setInstance(final T instance)
setNextback to summary
public void setNext(final HttpHandler next)