org.jacorb.notification.engine
Interface TaskProcessor

All Known Implementing Classes:
DefaultTaskProcessor

public interface TaskProcessor

Version:
$Id: TaskProcessor.java,v 1.25 2005/04/27 10:48:40 alphonse.bendt Exp $
Author:
Alphonse Bendt

Method Summary
 void cancelTask(java.lang.Object id)
           
 java.lang.Object executeTaskAfterDelay(long delay, java.lang.Runnable task)
           
 java.lang.Object executeTaskPeriodically(long intervall, java.lang.Runnable task, boolean startImmediately)
           
 TaskExecutor getFilterTaskExecutor()
           
 TaskFactory getTaskFactory()
           
 void processMessage(Message mesg)
          process a Message. the various settings for the Message (timeout, starttime, stoptime) are checked and applied.
 void schedulePushOperation(IProxyPushSupplier consumer)
          Schedule MessageConsumer for a deliver-Operation.
 void scheduleTimedPullTask(MessageSupplier dest)
          Schedule ProxyPullConsumer for pull-Operation.
 

Method Detail

getTaskFactory

public TaskFactory getTaskFactory()

getFilterTaskExecutor

public TaskExecutor getFilterTaskExecutor()

processMessage

public void processMessage(Message mesg)
process a Message. the various settings for the Message (timeout, starttime, stoptime) are checked and applied.


scheduleTimedPullTask

public void scheduleTimedPullTask(MessageSupplier dest)
                           throws java.lang.InterruptedException
Schedule ProxyPullConsumer for pull-Operation. If a Supplier connects to a ProxyPullConsumer the ProxyPullConsumer needs to regularely poll the Supplier. This method queues a Task to run runPullEvent on the specified TimerEventSupplier

Throws:
java.lang.InterruptedException

schedulePushOperation

public void schedulePushOperation(IProxyPushSupplier consumer)
                           throws java.lang.InterruptedException
Schedule MessageConsumer for a deliver-Operation. Some MessageConsumers (namely SequenceProxyPushSuppliers) need to push Messages regularely to its connected Consumer. Schedule a Task to call deliverPendingEvents on the specified MessageConsumer. Also used after a disabled MessageConsumer is enabled again to push the pending Messages.

Throws:
java.lang.InterruptedException

executeTaskPeriodically

public java.lang.Object executeTaskPeriodically(long intervall,
                                                java.lang.Runnable task,
                                                boolean startImmediately)

cancelTask

public void cancelTask(java.lang.Object id)

executeTaskAfterDelay

public java.lang.Object executeTaskAfterDelay(long delay,
                                              java.lang.Runnable task)