Package org.apache.activemq.advisory
Class DestinationSource
- java.lang.Object
-
- org.apache.activemq.advisory.DestinationSource
-
- All Implemented Interfaces:
MessageListener
public class DestinationSource extends Object implements 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
Constructors Constructor Description DestinationSource(Connection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
fireDestinationEvent(DestinationEvent event)
DestinationListener
getListener()
Set<ActiveMQQueue>
getQueues()
Returns the current queues available on the brokerSet<ActiveMQTempQueue>
getTemporaryQueues()
Returns the current temporary topics available on the brokerSet<ActiveMQTempTopic>
getTemporaryTopics()
Returns the current temporary queues available on the brokerSet<ActiveMQTopic>
getTopics()
Returns the current topics on the brokervoid
onMessage(Message message)
void
setDestinationListener(DestinationListener listener)
void
start()
void
stop()
-
-
-
Constructor Detail
-
DestinationSource
public DestinationSource(Connection connection) throws JMSException
- Throws:
JMSException
-
-
Method Detail
-
getListener
public DestinationListener getListener()
-
setDestinationListener
public void setDestinationListener(DestinationListener listener)
-
getQueues
public Set<ActiveMQQueue> getQueues()
Returns the current queues available on the broker
-
getTopics
public Set<ActiveMQTopic> getTopics()
Returns the current topics on the broker
-
getTemporaryQueues
public Set<ActiveMQTempQueue> getTemporaryQueues()
Returns the current temporary topics available on the broker
-
getTemporaryTopics
public Set<ActiveMQTempTopic> getTemporaryTopics()
Returns the current temporary queues available on the broker
-
start
public void start() throws JMSException
- Throws:
JMSException
-
stop
public void stop() throws JMSException
- Throws:
JMSException
-
onMessage
public void onMessage(Message message)
- Specified by:
onMessage
in interfaceMessageListener
-
fireDestinationEvent
protected void fireDestinationEvent(DestinationEvent event)
-
-