public class CacheInterceptor extends Object implements ClientRequestFilter, ClientResponseFilter
| Modifier and Type | Field and Description |
|---|---|
protected BrowserCache |
cache |
| Constructor and Description |
|---|
CacheInterceptor(BrowserCache cache) |
| Modifier and Type | Method and Description |
|---|---|
void |
cacheIfPossible(ClientRequestContext request,
ClientResponseContext response) |
void |
filter(ClientRequestContext request)
Filter method called before a request has been dispatched to a client
transport layer.
|
void |
filter(ClientRequestContext request,
ClientResponseContext response)
Filter method called after a response has been provided for a request
(either by a
request filter or when the
HTTP invocation returns. |
protected BrowserCache.Entry |
getEntry(ClientRequestContext request) |
void |
updateOnNotModified(ClientRequestContext request,
BrowserCache.Entry old,
ClientResponseContext response) |
protected BrowserCache cache
public CacheInterceptor(BrowserCache cache)
public void filter(ClientRequestContext request) throws IOException
ClientRequestFilterPriority).filter in interface ClientRequestFilterrequest - request context.IOException - if an I/O exception occurs.public void filter(ClientRequestContext request, ClientResponseContext response) throws IOException
ClientResponseFilterrequest filter or when the
HTTP invocation returns.
Filters in the filter chain are ordered according to their priority
(see Priority).filter in interface ClientResponseFilterrequest - request context.response - response context.IOException - if an I/O exception occurs.public void updateOnNotModified(ClientRequestContext request, BrowserCache.Entry old, ClientResponseContext response)
public void cacheIfPossible(ClientRequestContext request, ClientResponseContext response) throws IOException
IOExceptionprotected BrowserCache.Entry getEntry(ClientRequestContext request) throws Exception
ExceptionCopyright © 2018 JBoss by Red Hat. All rights reserved.