Class CacheHandler
- java.lang.Object
-
- io.undertow.server.handlers.cache.CacheHandler
-
- All Implemented Interfaces:
HttpHandler
public class CacheHandler extends Object implements HttpHandler
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
-
-
Constructor Summary
Constructors Constructor Description CacheHandler(DirectBufferCache cache)
CacheHandler(DirectBufferCache cache, HttpHandler next)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpHandler
getNext()
void
handleRequest(HttpServerExchange exchange)
Handle the request.CacheHandler
setNext(HttpHandler next)
-
-
-
Constructor Detail
-
CacheHandler
public CacheHandler(DirectBufferCache cache, HttpHandler next)
-
CacheHandler
public CacheHandler(DirectBufferCache cache)
-
-
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
-
getNext
public HttpHandler getNext()
-
setNext
public CacheHandler setNext(HttpHandler next)
-
-