public class TaskHandlerImpl<T,V> extends java.lang.Object implements BackgroundTaskHandler<V>
Constructor and Description |
---|
TaskHandlerImpl(UIAccessor uiAccessor,
TaskExecutor<T,V> taskExecutor,
WatchDog watchDog) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel()
Cancel task.
|
void |
closeByTimeout()
Cancel without events for tasks.
|
void |
execute()
Execute the
BackgroundTask . |
V |
getResult()
Join task thread to current
Caution! Call this method only from synchronous gui action |
long |
getStartTimeStamp() |
BackgroundTask<T,V> |
getTask() |
long |
getTimeoutMs() |
UserSession |
getUserSession() |
boolean |
isAlive() |
boolean |
isCancelled() |
boolean |
isDone() |
void |
kill()
Cancel without events for tasks
|
void |
timeoutExceeded()
Cancel with timeout exceeded event
|
public TaskHandlerImpl(UIAccessor uiAccessor, TaskExecutor<T,V> taskExecutor, WatchDog watchDog)
public final void execute()
BackgroundTaskHandler
BackgroundTask
.
execute
in interface BackgroundTaskHandler<V>
public final boolean cancel()
BackgroundTaskHandler
cancel
in interface BackgroundTaskHandler<V>
public final V getResult()
getResult
in interface BackgroundTaskHandler<V>
public final void closeByTimeout()
public final void kill()
public final void timeoutExceeded()
public final boolean isDone()
isDone
in interface BackgroundTaskHandler<V>
public final boolean isCancelled()
isCancelled
in interface BackgroundTaskHandler<V>
public final boolean isAlive()
isAlive
in interface BackgroundTaskHandler<V>
public final BackgroundTask<T,V> getTask()
public final UserSession getUserSession()
public long getStartTimeStamp()
public long getTimeoutMs()