Class DestinationSource

  • All Implemented Interfaces:
    javax.jms.MessageListener

    public class DestinationSource
    extends 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 Detail

      • DestinationSource

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

      • 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 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)