org.apache.activemq.network.jms
Class OutboundQueueBridge

java.lang.Object
  extended by org.apache.activemq.network.jms.DestinationBridge
      extended by org.apache.activemq.network.jms.OutboundQueueBridge
All Implemented Interfaces:
MessageListener, Service

public class OutboundQueueBridge
extends DestinationBridge

Create an Outbound Queue Bridge

Version:
$Revision: 1.1.1.1 $

Field Summary
protected  QueueConnection consumerConnection
           
protected  Queue consumerQueue
           
protected  QueueSession consumerSession
           
protected  QueueSender producer
           
protected  QueueConnection producerConnection
           
protected  Queue producerQueue
           
protected  QueueSession producerSession
           
protected  String selector
           
 
Fields inherited from class org.apache.activemq.network.jms.DestinationBridge
consumer, doHandleReplyTo, jmsConnector, jmsMessageConvertor, started
 
Constructor Summary
OutboundQueueBridge()
          Default Contructor
OutboundQueueBridge(String outboundQueueName)
          Constructor that takes a foreign destination as an argument
 
Method Summary
protected  MessageConsumer createConsumer()
           
protected  MessageProducer createProducer()
           
protected  Connection getConnectionForProducer()
           
protected  Connection getConnnectionForConsumer()
           
 QueueConnection getConsumerConnection()
           
 Queue getConsumerQueue()
           
 String getLocalQueueName()
           
 String getOutboundQueueName()
           
 QueueConnection getProducerConnection()
           
 Queue getProducerQueue()
           
 String getSelector()
           
protected  void sendMessage(Message message)
           
 void setConsumerConnection(QueueConnection consumerConnection)
           
 void setConsumerQueue(Queue consumerQueue)
           
 void setLocalQueueName(String localQueueName)
           
 void setOutboundQueueName(String outboundQueueName)
           
 void setProducerConnection(QueueConnection producerConnection)
           
 void setProducerQueue(Queue producerQueue)
           
 void setSelector(String selector)
           
 void stop()
           
 
Methods inherited from class org.apache.activemq.network.jms.DestinationBridge
getConsumer, getJmsMessageConvertor, getMaximumRetries, isDoHandleReplyTo, onMessage, processReplyToDestination, restartProducer, setConsumer, setDoHandleReplyTo, setJmsConnector, setJmsMessageConvertor, setMaximumRetries, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

consumerQueue

protected Queue consumerQueue

producerQueue

protected Queue producerQueue

consumerSession

protected QueueSession consumerSession

producerSession

protected QueueSession producerSession

selector

protected String selector

producer

protected QueueSender producer

consumerConnection

protected QueueConnection consumerConnection

producerConnection

protected QueueConnection producerConnection
Constructor Detail

OutboundQueueBridge

public OutboundQueueBridge(String outboundQueueName)
Constructor that takes a foreign destination as an argument

Parameters:
outboundQueueName -

OutboundQueueBridge

public OutboundQueueBridge()
Default Contructor

Method Detail

getOutboundQueueName

public String getOutboundQueueName()
Returns:
Returns the outboundQueueName.

setOutboundQueueName

public void setOutboundQueueName(String outboundQueueName)
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

stop

public void stop()
          throws Exception
Specified by:
stop in interface Service
Overrides:
stop in class DestinationBridge
Throws:
Exception

createConsumer

protected MessageConsumer createConsumer()
                                  throws JMSException
Specified by:
createConsumer in class DestinationBridge
Throws:
JMSException

createProducer

protected MessageProducer createProducer()
                                  throws JMSException
Specified by:
createProducer in class DestinationBridge
Throws:
JMSException

sendMessage

protected void sendMessage(Message message)
                    throws JMSException
Specified by:
sendMessage in class DestinationBridge
Throws:
JMSException

getConsumerConnection

public QueueConnection getConsumerConnection()
Returns:
Returns the consumerConnection.

setConsumerConnection

public void setConsumerConnection(QueueConnection consumerConnection)
Parameters:
consumerConnection - The consumerConnection to set.

getConsumerQueue

public Queue getConsumerQueue()
Returns:
Returns the consumerQueue.

setConsumerQueue

public void setConsumerQueue(Queue consumerQueue)
Parameters:
consumerQueue - The consumerQueue to set.

getProducerConnection

public QueueConnection getProducerConnection()
Returns:
Returns the producerConnection.

setProducerConnection

public void setProducerConnection(QueueConnection producerConnection)
Parameters:
producerConnection - The producerConnection to set.

getProducerQueue

public Queue getProducerQueue()
Returns:
Returns the producerQueue.

setProducerQueue

public void setProducerQueue(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.

getConnnectionForConsumer

protected Connection getConnnectionForConsumer()
Specified by:
getConnnectionForConsumer in class DestinationBridge

getConnectionForProducer

protected Connection getConnectionForProducer()
Specified by:
getConnectionForProducer in class DestinationBridge


Copyright © 2009. All Rights Reserved.