Class OutboundQueueBridge

  • All Implemented Interfaces:
    javax.jms.MessageListener, org.apache.activemq.Service

    public class OutboundQueueBridge
    extends DestinationBridge
    Create an Outbound Queue Bridge. By default the bridge uses the same name for both the inbound and outbound queues, however this can be altered by using the public setter methods to configure both inbound and outbound queue names.
    • Field Detail

      • consumerQueue

        protected javax.jms.Queue consumerQueue
      • producerQueue

        protected javax.jms.Queue producerQueue
      • consumerSession

        protected javax.jms.QueueSession consumerSession
      • producerSession

        protected javax.jms.QueueSession producerSession
      • selector

        protected String selector
      • producer

        protected javax.jms.QueueSender producer
      • consumerConnection

        protected javax.jms.QueueConnection consumerConnection
      • producerConnection

        protected javax.jms.QueueConnection producerConnection
    • Constructor Detail

      • OutboundQueueBridge

        public OutboundQueueBridge​(String outboundQueueName)
        Constructor that takes a foreign destination as an argument
        Parameters:
        outboundQueueName -
      • OutboundQueueBridge

        public OutboundQueueBridge()
        Default Constructor
    • Method Detail

      • getOutboundQueueName

        public String getOutboundQueueName()
        Returns:
        Returns the outboundQueueName.
      • setOutboundQueueName

        public void setOutboundQueueName​(String outboundQueueName)
        Sets the name of the outbound queue name. If the inbound queue name has not been set already then this method uses the provided queue name to set the inbound topic name as well.
        Parameters:
        outboundQueueName - The outboundQueueName to set.
      • getLocalQueueName

        public String getLocalQueueName()
        Returns:
        the localQueueName
      • setLocalQueueName

        public void setLocalQueueName​(String localQueueName)
        Parameters:
        localQueueName - the localQueueName to set
      • createConsumer

        protected javax.jms.MessageConsumer createConsumer()
                                                    throws javax.jms.JMSException
        Specified by:
        createConsumer in class DestinationBridge
        Throws:
        javax.jms.JMSException
      • createProducer

        protected javax.jms.MessageProducer createProducer()
                                                    throws javax.jms.JMSException
        Specified by:
        createProducer in class DestinationBridge
        Throws:
        javax.jms.JMSException
      • sendMessage

        protected void sendMessage​(javax.jms.Message message)
                            throws javax.jms.JMSException
        Specified by:
        sendMessage in class DestinationBridge
        Throws:
        javax.jms.JMSException
      • getConsumerConnection

        public javax.jms.QueueConnection getConsumerConnection()
        Returns:
        Returns the consumerConnection.
      • setConsumerConnection

        public void setConsumerConnection​(javax.jms.QueueConnection consumerConnection)
        Parameters:
        consumerConnection - The consumerConnection to set.
      • getConsumerQueue

        public javax.jms.Queue getConsumerQueue()
        Returns:
        Returns the consumerQueue.
      • setConsumerQueue

        public void setConsumerQueue​(javax.jms.Queue consumerQueue)
        Parameters:
        consumerQueue - The consumerQueue to set.
      • getProducerConnection

        public javax.jms.QueueConnection getProducerConnection()
        Returns:
        Returns the producerConnection.
      • setProducerConnection

        public void setProducerConnection​(javax.jms.QueueConnection producerConnection)
        Parameters:
        producerConnection - The producerConnection to set.
      • getProducerQueue

        public javax.jms.Queue getProducerQueue()
        Returns:
        Returns the producerQueue.
      • setProducerQueue

        public void setProducerQueue​(javax.jms.Queue producerQueue)
        Parameters:
        producerQueue - The producerQueue to set.
      • getSelector

        public String getSelector()
        Returns:
        Returns the selector.
      • setSelector

        public void setSelector​(String selector)
        Parameters:
        selector - The selector to set.