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 IExecutorsrunnable - the Runnable to executepublic <Result> void performOnForeground(Result result,
ICallback<Result> callback)
performOnForeground in interface IExecutorsResult - 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 IExecutorsResult - 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 IExecutorsResult - the result typeexception - the exception valuecallback - the callback to call on the foreground with this exceptionpublic ILogger getLogger()
public void shutdownBackgroundExecutors()
IExecutorsshutdownBackgroundExecutors in interface IExecutors