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

public Class CacheHandler

extends Object
implements HttpHandler
Class Inheritance
All Implemented Interfaces
io.undertow.server.HttpHandler
Imports
io.undertow.Handlers, io.undertow.server.ConduitWrapper, .HttpHandler, .HttpServerExchange, io.undertow.server.handlers.ResponseCodeHandler, io.undertow.server.handlers.encoding.AllowedContentEncodings, io.undertow.util.ConduitFactory, org.xnio.conduits.StreamSinkConduit

Handler that attaches a cache to the exchange, a handler can query this cache to see if the cache has a cached copy of the content, and if so have the cache serve this content automatically.
Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private final DirectBufferCache
private volatile HttpHandler

Constructor Summary

AccessConstructor and Description
public
CacheHandler(final DirectBufferCache cache, final HttpHandler next)

public

Method Summary

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

Implements io.undertow.server.HttpHandler.handleRequest.

Handle the request.

public CacheHandler
setNext(final HttpHandler next)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheback to summary
private final DirectBufferCache cache
nextback to summary
private volatile HttpHandler next

Constructor Detail

CacheHandlerback to summary
public CacheHandler(final DirectBufferCache cache, final HttpHandler next)
CacheHandlerback to summary
public CacheHandler(final DirectBufferCache cache)

Method Detail

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
setNextback to summary
public CacheHandler setNext(final HttpHandler next)