com.octo.android.robospice.request
Class DefaultRequestRunner
java.lang.Object
com.octo.android.robospice.request.DefaultRequestRunner
- All Implemented Interfaces:
- RequestRunner
public class DefaultRequestRunner
- extends Object
- implements RequestRunner
Default implementation of RequestRunner
. Processes requests. This class is massively multi-threaded and offers good
performances when processing multiple requests simulaneously.
- Author:
- SNI, Andrew Clark
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultRequestRunner
public DefaultRequestRunner(android.content.Context context,
CacheManager cacheManager,
ExecutorService executorService,
RequestProgressManager requestProgressBroadcaster,
NetworkStateChecker networkStateChecker)
executeRequest
public void executeRequest(CachedSpiceRequest<?> request)
- Description copied from interface:
RequestRunner
- Executes a request asynchronously.
- Specified by:
executeRequest
in interface RequestRunner
- Parameters:
request
- the request to execute.
processRequest
protected <T> void processRequest(CachedSpiceRequest<T> request)
planRequestExecution
protected void planRequestExecution(CachedSpiceRequest<?> request)
isFailOnCacheError
public boolean isFailOnCacheError()
- Specified by:
isFailOnCacheError
in interface RequestRunner
- Returns:
- whether or not the runner has to fail on cache errors.
setFailOnCacheError
public void setFailOnCacheError(boolean failOnCacheError)
- Specified by:
setFailOnCacheError
in interface RequestRunner
shouldStop
public void shouldStop()
- Description copied from interface:
RequestRunner
- Will be called to notify implementations that no further request
processing is needed anymore. Use this method to clean up resources.
- Specified by:
shouldStop
in interface RequestRunner
isStopped
public boolean isStopped()
Copyright © 2012-2014. All Rights Reserved.