org.jacorb.notification.engine
Class TaskProcessor
java.lang.Object
org.jacorb.notification.engine.TaskProcessor
- Configurable, Disposable
public class TaskProcessor
extends java.lang.Object
Version:
- Alphonse Bendt
TaskProcessor() - Start ClockDaemon
Set up TaskExecutors
Set up TaskFactory
|
TaskProcessor
public TaskProcessor()
Start ClockDaemon
Set up TaskExecutors
Set up TaskFactory
cancelTask
public void cancelTask(Object id)
configure
public void configure(Configuration conf)
configureTaskExecutor
public void configureTaskExecutor(AbstractProxySupplier proxySupplier)
configure a AbstractProxySupplier to use a TaskExecutor
dependent on the settings for the current Channel.
dispose
public void dispose()
shutdown this TaskProcessor. The TaskExecutors will be shutdown, the
running Threads interrupted and all
allocated ressources will be freed. As the active Threads will
be interrupted pending Events will be discarded.
- dispose in interface Disposable
executeTaskPeriodically
public Object executeTaskPeriodically(long intervall,
Runnable task,
boolean startImmediately)
getBackoutInterval
public long getBackoutInterval()
processMessage
public void processMessage(Message mesg)
process a Message. the various settings for the Message
(timeout, starttime, stoptime) are checked and applied.
processMessageInternal
protected void processMessageInternal(Message event)
process a Message. create FilterTask and schedule it.
visibility is protected so that method is accessible in test code.
scheduleTimedPullTask
public void scheduleTimedPullTask(MessageSupplier dest)
throws 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
scheduleTimedPushTask
public void scheduleTimedPushTask(MessageConsumer consumer)
throws 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.