org.jacorb.notification.engine
Class AbstractDeliverTask

java.lang.Object
  extended by org.jacorb.notification.interfaces.AbstractPoolable
      extended by org.jacorb.notification.engine.AbstractTask
          extended by org.jacorb.notification.engine.AbstractDeliverTask
All Implemented Interfaces:
java.lang.Runnable, org.apache.avalon.framework.configuration.Configurable, Disposable
Direct Known Subclasses:
PushToConsumerTask, TimerDeliverTask

public abstract class AbstractDeliverTask
extends AbstractTask

Version:
$Id: AbstractDeliverTask.java,v 1.10 2004/05/06 12:39:59 nicolas Exp $
Author:
Alphonse Bendt

Field Summary
 
Fields inherited from class org.jacorb.notification.engine.AbstractTask
message_
 
Fields inherited from class org.jacorb.notification.interfaces.AbstractPoolable
logger_
 
Constructor Summary
protected AbstractDeliverTask(TaskProcessor tp)
           
 
Method Summary
protected  MessageConsumer getMessageConsumer()
           
protected  TaskExecutor getTaskExecutor()
          override to use the TaskExecutor provided by the current MessageConsumer
 void handleTaskError(AbstractTask task, java.lang.Throwable error)
           
 void reset()
          Reset the Object to an initial state.
 void schedule()
           
protected  void schedule(boolean directRunAllowed)
          override default schedule to use the TaskExecutor provided by the current MessageConsumer.
static void scheduleTasks(AbstractDeliverTask[] tasks)
           
 void setMessageConsumer(MessageConsumer messageConsumer)
           
 
Methods inherited from class org.jacorb.notification.engine.AbstractTask
checkInterrupt, copyMessage, doWork, getTaskProcessor, removeMessage, run, schedule, setMessage, setTaskExecutor
 
Methods inherited from class org.jacorb.notification.interfaces.AbstractPoolable
configure, dispose, setObjectPool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDeliverTask

protected AbstractDeliverTask(TaskProcessor tp)
Method Detail

scheduleTasks

public static void scheduleTasks(AbstractDeliverTask[] tasks)
                          throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

reset

public void reset()
Description copied from class: AbstractPoolable
Reset the Object to an initial state. Subclasses should override this method appropiately to reset the instance to an initial state.

Overrides:
reset in class AbstractTask

getMessageConsumer

protected MessageConsumer getMessageConsumer()

setMessageConsumer

public void setMessageConsumer(MessageConsumer messageConsumer)

handleTaskError

public void handleTaskError(AbstractTask task,
                            java.lang.Throwable error)

schedule

protected void schedule(boolean directRunAllowed)
                 throws java.lang.InterruptedException
override default schedule to use the TaskExecutor provided by the current MessageConsumer.

Overrides:
schedule in class AbstractTask
Parameters:
directRunAllowed - this param specified if its allowed to run this Task on the calling Thread.
Throws:
java.lang.InterruptedException - if an error occurs

schedule

public void schedule()
              throws java.lang.InterruptedException
Specified by:
schedule in class AbstractTask
Throws:
java.lang.InterruptedException

getTaskExecutor

protected TaskExecutor getTaskExecutor()
override to use the TaskExecutor provided by the current MessageConsumer

Overrides:
getTaskExecutor in class AbstractTask