public abstract class AbstractTask extends AbstractPoolable implements 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, setObjectPool
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
schedule
protected TaskExecutor getTaskExecutor()
protected void setTaskExecutor(TaskExecutor taskExecutor)
public abstract void doWork() throws Exception
Exception
protected boolean isRunnable()
protected void checkInterrupt() throws InterruptedException
InterruptedException
protected 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.Copyright © 2017 JacORB. All rights reserved.