Package 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:
jakarta.jms.MessageListener,org.apache.activemq.Service
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jakarta.jms.QueueConnectionprotected jakarta.jms.Queueprotected jakarta.jms.QueueSessionprotected jakarta.jms.QueueSenderprotected jakarta.jms.QueueConnectionprotected jakarta.jms.Queueprotected jakarta.jms.QueueSessionprotected StringFields inherited from class org.apache.activemq.network.jms.DestinationBridge
consumer, doHandleReplyTo, jmsConnector, jmsMessageConvertor, started -
Constructor Summary
ConstructorsConstructorDescriptionDefault ConstructorInboundQueueBridge(String inboundQueueName) Constructor that takes a foreign destination as an argument -
Method Summary
Modifier and TypeMethodDescriptionprotected jakarta.jms.MessageConsumerprotected jakarta.jms.MessageProducerprotected jakarta.jms.Connectionprotected jakarta.jms.Connectionjakarta.jms.QueueConnectionjakarta.jms.Queuejakarta.jms.QueueConnectionjakarta.jms.Queueprotected voidsendMessage(jakarta.jms.Message message) voidsetConsumerConnection(jakarta.jms.QueueConnection consumerConnection) voidsetConsumerQueue(jakarta.jms.Queue consumerQueue) voidsetInboundQueueName(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.voidsetLocalQueueName(String localQueueName) voidsetProducerConnection(jakarta.jms.QueueConnection producerConnection) voidsetProducerQueue(jakarta.jms.Queue producerQueue) voidsetSelector(String selector) voidstop()Methods inherited from class org.apache.activemq.network.jms.DestinationBridge
getConsumer, getJmsMessageConvertor, isDoHandleReplyTo, onMessage, processReplyToDestination, setConsumer, setDoHandleReplyTo, setJmsConnector, setJmsMessageConvertor, start
-
Field Details
-
consumerQueue
protected jakarta.jms.Queue consumerQueue -
producerQueue
protected jakarta.jms.Queue producerQueue -
consumerSession
protected jakarta.jms.QueueSession consumerSession -
producerSession
protected jakarta.jms.QueueSession producerSession -
selector
-
producer
protected jakarta.jms.QueueSender producer -
consumerConnection
protected jakarta.jms.QueueConnection consumerConnection -
producerConnection
protected jakarta.jms.QueueConnection producerConnection
-
-
Constructor Details
-
InboundQueueBridge
Constructor that takes a foreign destination as an argument- Parameters:
inboundQueueName-
-
InboundQueueBridge
public InboundQueueBridge()Default Constructor
-
-
Method Details
-
getInboundQueueName
- Returns:
- Returns the inboundQueueName.
-
setInboundQueueName
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
- Returns:
- the localQueueName
-
setLocalQueueName
- Parameters:
localQueueName- the localQueueName to set
-
stop
- Specified by:
stopin interfaceorg.apache.activemq.Service- Overrides:
stopin classDestinationBridge- Throws:
Exception
-
createConsumer
protected jakarta.jms.MessageConsumer createConsumer() throws jakarta.jms.JMSException- Specified by:
createConsumerin classDestinationBridge- Throws:
jakarta.jms.JMSException
-
createProducer
protected jakarta.jms.MessageProducer createProducer() throws jakarta.jms.JMSException- Specified by:
createProducerin classDestinationBridge- Throws:
jakarta.jms.JMSException
-
sendMessage
protected void sendMessage(jakarta.jms.Message message) throws jakarta.jms.JMSException - Specified by:
sendMessagein classDestinationBridge- Throws:
jakarta.jms.JMSException
-
getConsumerConnection
public jakarta.jms.QueueConnection getConsumerConnection()- Returns:
- Returns the consumerConnection.
-
setConsumerConnection
public void setConsumerConnection(jakarta.jms.QueueConnection consumerConnection) - Parameters:
consumerConnection- The consumerConnection to set.
-
getConsumerQueue
public jakarta.jms.Queue getConsumerQueue()- Returns:
- Returns the consumerQueue.
-
setConsumerQueue
public void setConsumerQueue(jakarta.jms.Queue consumerQueue) - Parameters:
consumerQueue- The consumerQueue to set.
-
getProducerConnection
public jakarta.jms.QueueConnection getProducerConnection()- Returns:
- Returns the producerConnection.
-
setProducerConnection
public void setProducerConnection(jakarta.jms.QueueConnection producerConnection) - Parameters:
producerConnection- The producerConnection to set.
-
getProducerQueue
public jakarta.jms.Queue getProducerQueue()- Returns:
- Returns the producerQueue.
-
setProducerQueue
public void setProducerQueue(jakarta.jms.Queue producerQueue) - Parameters:
producerQueue- The producerQueue to set.
-
getSelector
- Returns:
- Returns the selector.
-
setSelector
- Parameters:
selector- The selector to set.
-
getConnnectionForConsumer
protected jakarta.jms.Connection getConnnectionForConsumer()- Specified by:
getConnnectionForConsumerin classDestinationBridge
-
getConnectionForProducer
protected jakarta.jms.Connection getConnectionForProducer()- Specified by:
getConnectionForProducerin classDestinationBridge
-