org.fusesource.restygwt.client.callback
Class CachingCallbackFilter

java.lang.Object
  extended by org.fusesource.restygwt.client.callback.CachingCallbackFilter
All Implemented Interfaces:
CallbackFilter
Direct Known Subclasses:
RestfulCachingCallbackFilter

public class CachingCallbackFilter
extends Object
implements CallbackFilter


Field Summary
protected  QueueableCacheStorage cache
           
 
Constructor Summary
CachingCallbackFilter(QueueableCacheStorage cache)
           
 
Method Summary
protected  CacheKey cacheKey(RequestBuilder builder)
           
protected  void cacheResult(Method method, Response response)
           
 RequestCallback filter(Method method, Response response, RequestCallback callback)
          the real filter method, called independent of the response code TODO method.getResponse() is not equal to response.
protected  String[] getCacheDomains(Method method)
          when using the Domain annotation on services, we are able to group responses of a service to invalidate them later on more fine grained.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

protected final QueueableCacheStorage cache
Constructor Detail

CachingCallbackFilter

public CachingCallbackFilter(QueueableCacheStorage cache)
Method Detail

filter

public RequestCallback filter(Method method,
                              Response response,
                              RequestCallback callback)
the real filter method, called independent of the response code TODO method.getResponse() is not equal to response. unfortunately

Specified by:
filter in interface CallbackFilter
Returns:
continue chain or not

cacheKey

protected CacheKey cacheKey(RequestBuilder builder)

cacheResult

protected void cacheResult(Method method,
                           Response response)

getCacheDomains

protected String[] getCacheDomains(Method method)
when using the Domain annotation on services, we are able to group responses of a service to invalidate them later on more fine grained. this method resolves a possible ``domain`` to allow grouping.

Returns:


Copyright © 2010-2011 FuseSource, Corp.. All Rights Reserved.