Class CacheInterceptor
- java.lang.Object
-
- org.jboss.resteasy.client.jaxrs.cache.CacheInterceptor
-
- All Implemented Interfaces:
ClientRequestFilter,ClientResponseFilter
public class CacheInterceptor extends Object implements ClientRequestFilter, ClientResponseFilter
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description protected BrowserCachecache
-
Constructor Summary
Constructors Constructor Description CacheInterceptor(BrowserCache cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcacheIfPossible(ClientRequestContext request, ClientResponseContext response)voidfilter(ClientRequestContext request)Filter method called before a request has been dispatched to a client transport layer.voidfilter(ClientRequestContext request, ClientResponseContext response)Filter method called after a response has been provided for a request (either by arequest filteror when the HTTP invocation returns).protected BrowserCache.EntrygetEntry(ClientRequestContext request)voidupdateOnNotModified(ClientRequestContext request, BrowserCache.Entry old, ClientResponseContext response)
-
-
-
Field Detail
-
cache
protected BrowserCache cache
-
-
Constructor Detail
-
CacheInterceptor
public CacheInterceptor(BrowserCache cache)
-
-
Method Detail
-
filter
public void filter(ClientRequestContext request) throws IOException
Description copied from interface:ClientRequestFilterFilter method called before a request has been dispatched to a client transport layer. Filters in the filter chain are ordered according to theirjakarta.annotation.Priorityclass-level annotation value.- Specified by:
filterin interfaceClientRequestFilter- Parameters:
request- request context.- Throws:
IOException- if an I/O exception occurs.
-
filter
public void filter(ClientRequestContext request, ClientResponseContext response) throws IOException
Description copied from interface:ClientResponseFilterFilter method called after a response has been provided for a request (either by arequest filteror when the HTTP invocation returns). Filters in the filter chain are ordered according to theirjakarta.annotation.Priorityclass-level annotation value.- Specified by:
filterin interfaceClientResponseFilter- Parameters:
request- request context.response- response context.- Throws:
IOException- if an I/O exception occurs.
-
updateOnNotModified
public void updateOnNotModified(ClientRequestContext request, BrowserCache.Entry old, ClientResponseContext response)
-
cacheIfPossible
public void cacheIfPossible(ClientRequestContext request, ClientResponseContext response) throws IOException
- Throws:
IOException
-
getEntry
protected BrowserCache.Entry getEntry(ClientRequestContext request) throws Exception
- Throws:
Exception
-
-