org.fusesource.restygwt.client.dispatcher
Class RestfulCachingDispatcherFilter

java.lang.Object
  extended by org.fusesource.restygwt.client.dispatcher.CachingDispatcherFilter
      extended by org.fusesource.restygwt.client.dispatcher.RestfulCachingDispatcherFilter
All Implemented Interfaces:
DispatcherFilter

public class RestfulCachingDispatcherFilter
extends CachingDispatcherFilter

using a different caching 'algorithm' obeying the restful paradigm, i.e. the cache respects the lifecycle of a restful resource:

  • POST /model : will get the user responds into the cache using the location header for the key
  • GET /model/{id} : will use the cached responds from cache if present
  • PUT /model/{id} : will put the responds from the server into the cache. a conflict will delete the cache entry to allow a get to retrieve the up to date date
  • DELETE /model/{id} : will also delete the resource in the cache
  • Author:
    Kristian

    Constructor Summary
    RestfulCachingDispatcherFilter(QueueableCacheStorage cacheStorage, CallbackFactory cf)
               
     
    Method Summary
    protected  CacheKey cacheKey(RequestBuilder builder)
               
     
    Methods inherited from class org.fusesource.restygwt.client.dispatcher.CachingDispatcherFilter
    filter
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    RestfulCachingDispatcherFilter

    public RestfulCachingDispatcherFilter(QueueableCacheStorage cacheStorage,
                                          CallbackFactory cf)
    Method Detail

    cacheKey

    protected CacheKey cacheKey(RequestBuilder builder)
    Overrides:
    cacheKey in class CachingDispatcherFilter


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