org.jacorb.notification.engine
Class AbstractTask
- Configurable, Runnable, Disposable
public abstract class AbstractTask
implements Runnable
Version:
- Alphonse Bendt
checkInterrupt
protected void checkInterrupt()
throws InterruptedException
copyMessage
public Message copyMessage()
doWork
public void doWork()
throws Exception
Override this Method in Subclasses to do the "real work".
removeMessage
public Message removeMessage()
reset
public void reset()
Reset the Object to an initial state. Subclasses should
override this method appropiately to reset the instance to an
initial state.
- reset in interface AbstractPoolable
run
public void run()
template method.
- Call doWork()
schedule
public void schedule()
throws InterruptedException
schedule
protected void schedule(boolean directRunAllowed)
throws InterruptedException
Run this Task on its configured Executor.
directRunAllowed
- this param specified if its allowed to
run this Task on the calling Thread.
schedule
protected void schedule(TaskExecutor executor,
boolean directRunAllowed)
throws InterruptedException
Run this Task on the provided Executor.
executor
- a TaskExecutor
valuedirectRunAllowed
- a boolean
value
setMessage
public void setMessage(Message event)
set the Message for this Task to use.
setTaskExecutor
protected void setTaskExecutor(TaskExecutor taskExecutor)