org.jacorb.notification.engine

Class AbstractTask

public abstract class AbstractTask extends AbstractPoolable implements Runnable, Schedulable

Version: $Id: AbstractTask.java,v 1.17 2005/10/02 15:18:39 alphonse.bendt Exp $

Author: Alphonse Bendt

Method Summary
protected voidcheckInterrupt()
abstract voiddoWork()
Override this Method in Subclasses to do the "real work".
protected TaskExecutorgetTaskExecutor()
protected booleanisRunnable()
voidrun()
run method invoked by TaskExecutor.
protected voidschedule(boolean directRunAllowed)
schedule this Task for execution.
protected voidschedule(TaskExecutor executor, boolean directRunAllowed)
schedule this Task for execution.
protected voidsetTaskExecutor(TaskExecutor taskExecutor)

Method Detail

checkInterrupt

protected void checkInterrupt()

doWork

public abstract void doWork()
Override this Method in Subclasses to do the "real work".

getTaskExecutor

protected TaskExecutor getTaskExecutor()

isRunnable

protected boolean isRunnable()

run

public void run()
run method invoked by TaskExecutor.

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 Task directRunAllowed true, if the task may be run in the calling thread. false, if the TaskExecutor should be used.

setTaskExecutor

protected void setTaskExecutor(TaskExecutor taskExecutor)