Class DestinationSource

java.lang.Object
org.apache.activemq.advisory.DestinationSource
All Implemented Interfaces:
jakarta.jms.MessageListener

public class DestinationSource extends Object implements jakarta.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 Details

    • DestinationSource

      public DestinationSource(jakarta.jms.Connection connection) throws jakarta.jms.JMSException
      Throws:
      jakarta.jms.JMSException
  • Method Details

    • 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 jakarta.jms.JMSException
      Throws:
      jakarta.jms.JMSException
    • stop

      public void stop() throws jakarta.jms.JMSException
      Throws:
      jakarta.jms.JMSException
    • onMessage

      public void onMessage(jakarta.jms.Message message)
      Specified by:
      onMessage in interface jakarta.jms.MessageListener
    • fireDestinationEvent

      protected void fireDestinationEvent(DestinationEvent event)