public abstract class AbstractTask extends AbstractPoolable implements java.lang.Runnable, Schedulable
logger_| Constructor and Description |
|---|
AbstractTask() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkInterrupt() |
abstract void |
doWork()
Override this Method in Subclasses to do the "real work".
|
protected TaskExecutor |
getTaskExecutor() |
protected boolean |
isRunnable() |
void |
run()
run method invoked by TaskExecutor.
|
protected void |
schedule(boolean directRunAllowed)
schedule this Task for execution.
|
protected void |
schedule(TaskExecutor executor,
boolean directRunAllowed)
schedule this Task for execution.
|
protected void |
setTaskExecutor(TaskExecutor taskExecutor) |
dispose, reset, setObjectPoolclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitscheduleprotected TaskExecutor getTaskExecutor()
protected void setTaskExecutor(TaskExecutor taskExecutor)
public abstract void doWork()
throws java.lang.Exception
java.lang.Exceptionprotected boolean isRunnable()
public void run()
run in interface java.lang.Runnableprotected void checkInterrupt()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionprotected void schedule(boolean directRunAllowed)
directRunAllowed - true, if the task may be run in the calling thread. false, if the TaskExecutor
should be used.protected void schedule(TaskExecutor executor, boolean directRunAllowed)
executor - TaskExecutor that should execute this TaskdirectRunAllowed - true, if the task may be run in the calling thread. false, if the TaskExecutor
should be used.