protected abstract class Controller.Worker<S> extends Thread
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected String |
message
The message to display after completing the task.
|
protected String |
method
The name of the
Method that is to be invoked on source. |
protected int |
pollingInterval
The polling interval at which client must poll server for results of task execution.
|
protected S |
source
The source object on which the specified
method is to be invoked. |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Modifier | Constructor and Description |
|---|---|
protected |
Worker()
Default constructor.
|
protected |
Worker(int pollingInterval,
S source,
String method,
String message)
Create a new instance of the worker with the specified values.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
execute()
|
void |
run()
Implementation of the Runnable interface.
|
protected void |
setMessage(String message)
Set
message. |
protected void |
setMethod(String method)
Set
method. |
protected void |
setPollingInterval(int pollingInterval)
Set
pollingInterval. |
protected void |
setSource(S source)
Set
source. |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprotected int pollingInterval
protected String message
public void run()
execute().protected abstract void execute()
protected void setPollingInterval(int pollingInterval)
pollingInterval.pollingInterval - The value to set.protected void setMethod(String method)
method.method - The value to set.