org.jboss.resteasy.client.cache
Class CacheInterceptor

java.lang.Object
  extended by org.jboss.resteasy.client.cache.CacheInterceptor
All Implemented Interfaces:
AcceptedByMethod, ClientExecutionInterceptor

public class CacheInterceptor
extends java.lang.Object
implements ClientExecutionInterceptor, AcceptedByMethod

Version:
$Revision: 1 $
Author:
Bill Burke

Field Summary
protected  BrowserCache cache
           
 
Constructor Summary
CacheInterceptor(BrowserCache cache)
           
 
Method Summary
 boolean accept(java.lang.Class declaring, java.lang.reflect.Method method)
           
 ClientResponse cacheIfPossible(ClientRequest request, BaseClientResponse response)
           
 ClientResponse execute(ClientExecutionContext ctx)
           
protected  BrowserCache.Entry getEntry(ClientRequest request)
           
protected  ClientResponse handleExpired(ClientExecutionContext ctx, ClientRequest request, BrowserCache.Entry entry)
           
 ClientResponse updateOnNotModified(ClientRequest request, BrowserCache.Entry old, BaseClientResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

protected BrowserCache cache
Constructor Detail

CacheInterceptor

public CacheInterceptor(BrowserCache cache)
Method Detail

accept

public boolean accept(java.lang.Class declaring,
                      java.lang.reflect.Method method)
Specified by:
accept in interface AcceptedByMethod

execute

public ClientResponse execute(ClientExecutionContext ctx)
                       throws java.lang.Exception
Specified by:
execute in interface ClientExecutionInterceptor
Throws:
java.lang.Exception

handleExpired

protected ClientResponse handleExpired(ClientExecutionContext ctx,
                                       ClientRequest request,
                                       BrowserCache.Entry entry)
                                throws java.lang.Exception
Throws:
java.lang.Exception

updateOnNotModified

public ClientResponse updateOnNotModified(ClientRequest request,
                                          BrowserCache.Entry old,
                                          BaseClientResponse response)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

cacheIfPossible

public ClientResponse cacheIfPossible(ClientRequest request,
                                      BaseClientResponse response)
                               throws java.lang.Exception
Throws:
java.lang.Exception

getEntry

protected BrowserCache.Entry getEntry(ClientRequest request)
                               throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2010. All Rights Reserved.