org.apache.activemq.advisory
Class DestinationSource

java.lang.Object
  extended by org.apache.activemq.advisory.DestinationSource
All Implemented Interfaces:
javax.jms.MessageListener

public class DestinationSource
extends java.lang.Object
implements javax.jms.MessageListener

A helper class which keeps track of the Destinations available in a broker and allows you to listen to them being created or deleted.


Constructor Summary
DestinationSource(javax.jms.Connection connection)
           
 
Method Summary
protected  void fireDestinationEvent(DestinationEvent event)
           
 DestinationListener getListener()
           
 java.util.Set<ActiveMQQueue> getQueues()
          Returns the current queues available on the broker
 java.util.Set<ActiveMQTempQueue> getTemporaryQueues()
          Returns the current temporary topics available on the broker
 java.util.Set<ActiveMQTempTopic> getTemporaryTopics()
          Returns the current temporary queues available on the broker
 java.util.Set<ActiveMQTopic> getTopics()
          Returns the current topics on the broker
 void onMessage(javax.jms.Message message)
           
 void setDestinationListener(DestinationListener listener)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DestinationSource

public DestinationSource(javax.jms.Connection connection)
                  throws javax.jms.JMSException
Throws:
javax.jms.JMSException
Method Detail

getListener

public DestinationListener getListener()

setDestinationListener

public void setDestinationListener(DestinationListener listener)

getQueues

public java.util.Set<ActiveMQQueue> getQueues()
Returns the current queues available on the broker


getTopics

public java.util.Set<ActiveMQTopic> getTopics()
Returns the current topics on the broker


getTemporaryQueues

public java.util.Set<ActiveMQTempQueue> getTemporaryQueues()
Returns the current temporary topics available on the broker


getTemporaryTopics

public java.util.Set<ActiveMQTempTopic> getTemporaryTopics()
Returns the current temporary queues available on the broker


start

public void start()
           throws javax.jms.JMSException
Throws:
javax.jms.JMSException

stop

public void stop()
          throws javax.jms.JMSException
Throws:
javax.jms.JMSException

onMessage

public void onMessage(javax.jms.Message message)
Specified by:
onMessage in interface javax.jms.MessageListener

fireDestinationEvent

protected void fireDestinationEvent(DestinationEvent event)


Copyright © 2005-2012. All Rights Reserved.