org.apache.activemq.network.jms
Class InboundQueueBridge
java.lang.Object
org.apache.activemq.network.jms.DestinationBridge
org.apache.activemq.network.jms.InboundQueueBridge
- All Implemented Interfaces:
- javax.jms.MessageListener, Service
public class InboundQueueBridge
- extends DestinationBridge
Create an Inbound Queue Bridge. By default this class uses the sname name for
both the inbound and outbound queue. This behavior can be overridden however
by using the setter methods to configure both the inbound and outboud queue names
separately.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 java.lang.String selector
producer
protected javax.jms.QueueSender producer
consumerConnection
protected javax.jms.QueueConnection consumerConnection
producerConnection
protected javax.jms.QueueConnection producerConnection
InboundQueueBridge
public InboundQueueBridge(java.lang.String inboundQueueName)
- Constructor that takes a foreign destination as an argument
- Parameters:
inboundQueueName
-
InboundQueueBridge
public InboundQueueBridge()
- Default Constructor
getInboundQueueName
public java.lang.String getInboundQueueName()
- Returns:
- Returns the inboundQueueName.
setInboundQueueName
public void setInboundQueueName(java.lang.String inboundQueueName)
- Sets the queue name used for the inbound queue, if the outbound queue
name has not been set, then this method uses the same name to configure
the outbound queue name.
- Parameters:
inboundQueueName
- The inboundQueueName to set.
getLocalQueueName
public java.lang.String getLocalQueueName()
- Returns:
- the localQueueName
setLocalQueueName
public void setLocalQueueName(java.lang.String localQueueName)
- Parameters:
localQueueName
- the localQueueName to set
stop
public void stop()
throws java.lang.Exception
- Specified by:
stop
in interface Service
- Overrides:
stop
in class DestinationBridge
- Throws:
java.lang.Exception
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 java.lang.String getSelector()
- Returns:
- Returns the selector.
setSelector
public void setSelector(java.lang.String selector)
- Parameters:
selector
- The selector to set.
getConnnectionForConsumer
protected javax.jms.Connection getConnnectionForConsumer()
- Specified by:
getConnnectionForConsumer
in class DestinationBridge
getConnectionForProducer
protected javax.jms.Connection getConnectionForProducer()
- Specified by:
getConnectionForProducer
in class DestinationBridge
Copyright © 2005-2015. All Rights Reserved.