com.octo.android.robospice.request
Class RequestProcessor

java.lang.Object
  extended by com.octo.android.robospice.request.RequestProcessor

public class RequestProcessor
extends Object

Delegate class of the SpiceService, easier to test than an Android Service.

Author:
jva

Constructor Summary
RequestProcessor(CacheManager cacheManager, RequestProgressManager requestProgressManager, RequestRunner requestRunner)
          Build a request processor using a custom.
 
Method Summary
 void addRequest(CachedSpiceRequest<?> request, Set<RequestListener<?>> listRequestListener)
           
 void addSpiceServiceListener(SpiceServiceListener spiceServiceListener)
           
 void dontNotifyRequestListenersForRequest(CachedSpiceRequest<?> request, Collection<RequestListener<?>> listRequestListener)
          Disable request listeners notifications for a specific request.
 boolean isFailOnCacheError()
           
 boolean isStopped()
           
 void removeAllDataFromCache()
           
 void removeAllDataFromCache(Class<?> clazz)
           
 boolean removeDataFromCache(Class<?> clazz, Object cacheKey)
           
 void removeSpiceServiceListener(SpiceServiceListener spiceServiceListener)
           
 void setFailOnCacheError(boolean failOnCacheError)
           
 void shouldStop()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequestProcessor

public RequestProcessor(CacheManager cacheManager,
                        RequestProgressManager requestProgressManager,
                        RequestRunner requestRunner)
Build a request processor using a custom. This feature has been implemented following a feature request from Riccardo Ciovati.

Parameters:
cacheManager - the CacheManager that will be used to retrieve requests' result and store them.
requestProgressManager -
requestRunner -
Method Detail

addRequest

public void addRequest(CachedSpiceRequest<?> request,
                       Set<RequestListener<?>> listRequestListener)

dontNotifyRequestListenersForRequest

public void dontNotifyRequestListenersForRequest(CachedSpiceRequest<?> request,
                                                 Collection<RequestListener<?>> listRequestListener)
Disable request listeners notifications for a specific request.
All listeners associated to this request won't be called when request will finish.

Parameters:
request - Request on which you want to disable listeners
listRequestListener - the collection of listeners associated to request not to be notified

removeDataFromCache

public boolean removeDataFromCache(Class<?> clazz,
                                   Object cacheKey)

removeAllDataFromCache

public void removeAllDataFromCache(Class<?> clazz)

removeAllDataFromCache

public void removeAllDataFromCache()

isFailOnCacheError

public boolean isFailOnCacheError()

setFailOnCacheError

public void setFailOnCacheError(boolean failOnCacheError)

toString

public String toString()
Overrides:
toString in class Object

addSpiceServiceListener

public void addSpiceServiceListener(SpiceServiceListener spiceServiceListener)

removeSpiceServiceListener

public void removeSpiceServiceListener(SpiceServiceListener spiceServiceListener)

shouldStop

public void shouldStop()

isStopped

public boolean isStopped()


Copyright © 2012-2014. All Rights Reserved.