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.15 2005/04/27 10:48:40 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()
- template method.
- Call doWork()
- 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)
throws java.lang.InterruptedException
- Run this Task on its configured Executor.
- Parameters:
directRunAllowed
- this param specified if its allowed to run this Task on the calling Thread.
- Throws:
InterruptedException
- if an error occurs
schedule
protected void schedule(TaskExecutor executor,
boolean directRunAllowed)
throws java.lang.InterruptedException
- Run this Task on the provided Executor.
- Parameters:
executor
- a TaskExecutor
valuedirectRunAllowed
- a boolean
value
- Throws:
InterruptedException
- if an error occurs