org.bss.esb.redelivery
Class RedeliveryScheduler

java.lang.Object
  extended byorg.bss.esb.redelivery.RedeliveryScheduler

public class RedeliveryScheduler
extends java.lang.Object

This is a Singleton class that performs the scheduling of the RedeliveryTasks using a single Timer instance. At the one time initialization, it browses the ESB's configured redelivery queue to look for any pending messages. Based on the redelivery properties of each message, it schedules a RedeliveryTask instance. After the startup clients can use this class for scheduling new RedeliveryTasks.

Version:
1.0
Author:
Balwinder Sodhi
See Also:
RedeliveryTask

Method Summary
static RedeliveryScheduler getInstance()
          Returns the singleton instance of this class.
 void resetRedeliveryScheduler()
          It first cancels the Timer instance associated with this RedeliveryScheduler instance, then assigns a new instance of the Timer to the member.
 void scheduleMessageForDelivery(long deliveryTime)
           
 void stopRedeliveryScheduler()
          Stops the Timer instance associated with this RedeliveryScheduler instance.
 void unregisterMBean(javax.naming.InitialContext ic)
          Unregisters the RedeliverySchedulerMonitorMBean instance associated with this RedeliveryScheduler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static RedeliveryScheduler getInstance()
                                       throws java.lang.Exception
Returns the singleton instance of this class.

Returns:
RedeliveryScheduler
Throws:
java.lang.Exception

scheduleMessageForDelivery

public void scheduleMessageForDelivery(long deliveryTime)
                                throws RedeliverySchedulingException
Throws:
RedeliverySchedulingException

unregisterMBean

public void unregisterMBean(javax.naming.InitialContext ic)
Unregisters the RedeliverySchedulerMonitorMBean instance associated with this RedeliveryScheduler.

Parameters:
ic - The JNDI initial naming context.

stopRedeliveryScheduler

public void stopRedeliveryScheduler()
Stops the Timer instance associated with this RedeliveryScheduler instance.


resetRedeliveryScheduler

public void resetRedeliveryScheduler()
It first cancels the Timer instance associated with this RedeliveryScheduler instance, then assigns a new instance of the Timer to the member.



Copyright © 2005 Balwinder Sodhi. All Rights Reserved.