org.openeai.jms.consumer
Class PointToPointConsumer.MonitorConsumer
java.lang.Object
org.openeai.jms.consumer.PointToPointConsumer.MonitorConsumer
- All Implemented Interfaces:
- java.lang.Runnable
- Enclosing class:
- PointToPointConsumer
protected class PointToPointConsumer.MonitorConsumer
- extends java.lang.Object
- implements java.lang.Runnable
This Thread will sleep for a specified period of time and then wake up
and check the status of the consumer by attempting to create/delete a TemporaryQueue.
If the creation of the TemporaryQueue fails, it assumes there is something wrong
with the consumer's connection to the broker and it is not consuming any messages.
When that happens, it attempts to do a "clean" shutdown on the consumer and
then restarts the consumer which will re-establish its connection to the broker
and it will start consuming messages again. This means, if brokers must be taken down
for any reason (on purpose or not), gateways will NOT need to be restarted
when the broker comes back up, rather, they will do that themselves. This process
continues until it is stopped via the stopMonitor method or until the gateway
is stopped. If a broker is down for an extended period of time, this Monitor
will continue to try and reconnect until the broker is back online.
The thread is started when the consumer is started the first time.
- Author:
- Tod Jackson
- See Also:
PointToPointConsumer.stopMonitor()
|
Method Summary |
void |
run()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PointToPointConsumer.MonitorConsumer
public PointToPointConsumer.MonitorConsumer(int sleepInterval)
run
public void run()
- Specified by:
run in interface java.lang.Runnable
Copyright © 2002,2003 OpenEAI Software Foundation