org.jacorb.notification.engine
Class AbstractTask
java.lang.Object
org.jacorb.notification.util.AbstractPoolable
org.jacorb.notification.engine.AbstractTask
- All Implemented Interfaces:
- org.picocontainer.Disposable, Disposable, java.lang.Runnable, Schedulable
- Direct Known Subclasses:
- AbstractMessageTask, PullFromSupplierTask
- public abstract class AbstractTask
- extends AbstractPoolable
- implements java.lang.Runnable, Schedulable
- Version:
- $Id: AbstractTask.java,v 1.17 2005/10/02 15:18:39 alphonse.bendt Exp $
- Author:
- Alphonse Bendt
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTask
public AbstractTask()
getTaskExecutor
protected TaskExecutor getTaskExecutor()
setTaskExecutor
protected void setTaskExecutor(TaskExecutor taskExecutor)
doWork
public abstract void doWork()
throws java.lang.Exception
- Override this Method in Subclasses to do the "real work".
- Throws:
java.lang.Exception
isRunnable
protected boolean isRunnable()
run
public void run()
- run method invoked by TaskExecutor.
- Specified by:
run
in interface java.lang.Runnable
checkInterrupt
protected void checkInterrupt()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
schedule
protected void schedule(boolean directRunAllowed)
- schedule this Task for execution.
- Parameters:
directRunAllowed
- true, if the task may be run in the calling thread. false, if the TaskExecutor
should be used.
schedule
protected void schedule(TaskExecutor executor,
boolean directRunAllowed)
- schedule this Task for execution.
- Parameters:
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.