public class DefaultExecutors extends java.lang.Object implements IExecutors
Constructor and Description |
---|
DefaultExecutors(ILogger logger)
Creates a new instance of the DefaultExecutors
|
Modifier and Type | Method and Description |
---|---|
ILogger |
getLogger() |
void |
performOnBackground(java.lang.Runnable runnable)
Runs the given Runnable on the background thread
|
<Result> void |
performOnForeground(ClientException exception,
ICallback<Result> callback)
Performs the given callback with the exception object
|
<Result> void |
performOnForeground(int progress,
int progressMax,
IProgressCallback<Result> callback)
Performs the given callback with the result object
|
<Result> void |
performOnForeground(Result result,
ICallback<Result> callback)
Performs the given callback with the result object
|
void |
shutdownBackgroundExecutors()
Shuts down the background executors
|
public DefaultExecutors(ILogger logger)
logger
- the loggerpublic void performOnBackground(java.lang.Runnable runnable)
performOnBackground
in interface IExecutors
runnable
- the Runnable to executepublic <Result> void performOnForeground(Result result, ICallback<Result> callback)
performOnForeground
in interface IExecutors
Result
- the result typeresult
- the result valuecallback
- the callback to call on the foreground with this resultpublic <Result> void performOnForeground(int progress, int progressMax, IProgressCallback<Result> callback)
performOnForeground
in interface IExecutors
Result
- the result typeprogress
- the progress valueprogressMax
- the progress valuecallback
- the callback to call on the foreground with this resultpublic <Result> void performOnForeground(ClientException exception, ICallback<Result> callback)
performOnForeground
in interface IExecutors
Result
- the result typeexception
- the exception valuecallback
- the callback to call on the foreground with this exceptionpublic ILogger getLogger()
public void shutdownBackgroundExecutors()
IExecutors
shutdownBackgroundExecutors
in interface IExecutors