com.octo.android.robospice.request
Class RequestProcessor
java.lang.Object
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
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
-
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 listenerslistRequestListener
- 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.