org.bss.esb.redelivery
Class RedeliveryTask
java.lang.Object
java.util.TimerTask
org.bss.esb.redelivery.RedeliveryTask
- All Implemented Interfaces:
- java.lang.Runnable
- public class RedeliveryTask
- extends java.util.TimerTask
This class represents a task that can be scheduled by Timer
instance. When scheduled, this task will do the following:
1) Receive a message from the configured ESB redelivery queue.
A selector that is passed while creating this task instance is used for
receiving the message.
2) If a message is received, then that is sent to the ESB's input queue.
- Version:
- 1.0
- Author:
- Balwinder Sodhi
- See Also:
RedeliveryScheduler
Constructor Summary |
RedeliveryTask(java.lang.String qcfName,
java.lang.String redeliveryQueueName,
java.lang.String esbInputQueue,
java.lang.String selector)
Constructor that initializes the members. |
Method Summary |
void |
run()
It does the following in that order:
|
Methods inherited from class java.util.TimerTask |
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RedeliveryTask
public RedeliveryTask(java.lang.String qcfName,
java.lang.String redeliveryQueueName,
java.lang.String esbInputQueue,
java.lang.String selector)
throws javax.naming.NamingException,
javax.jms.JMSException,
java.io.IOException
- Constructor that initializes the members.
- Parameters:
qcfName
- JNDI name of the QueueConnectionFactory.redeliveryQueueName
- JNDI name of the redelivery queue.esbInputQueue
- JNDI name of the ESB's input queue.selector
- Selector string for creating the receiver.
run
public void run()
- It does the following in that order:
1) Creates the JMS QueueConnection with the supplied factory name.
2) Looks up the JMS queue for the supplied name.
3) Creates a JMS QueueReceiver with the supplied selector.
4) Receives (without wait) the message using the above receiver.
5) If a message is received, then the ESB's input Queue is looked up
and a JMS QueueSender is created which is used to send the message
that was received in step #4 above.
Copyright © 2005 Balwinder Sodhi. All Rights Reserved.