org.apache.activemq.network.jms
Class DestinationBridge

java.lang.Object
  extended by org.apache.activemq.network.jms.DestinationBridge
All Implemented Interfaces:
MessageListener, Service
Direct Known Subclasses:
InboundQueueBridge, InboundTopicBridge, OutboundQueueBridge, OutboundTopicBridge

public abstract class DestinationBridge
extends Object
implements Service, MessageListener

A Destination bridge is used to bridge between to different JMS systems


Field Summary
protected  MessageConsumer consumer
           
protected  boolean doHandleReplyTo
           
protected  JmsConnector jmsConnector
           
protected  JmsMesageConvertor jmsMessageConvertor
           
protected  AtomicBoolean started
           
 
Constructor Summary
DestinationBridge()
           
 
Method Summary
protected abstract  MessageConsumer createConsumer()
           
protected abstract  MessageProducer createProducer()
           
protected abstract  Connection getConnectionForProducer()
           
protected abstract  Connection getConnnectionForConsumer()
           
 MessageConsumer getConsumer()
           
 JmsMesageConvertor getJmsMessageConvertor()
           
protected  boolean isDoHandleReplyTo()
           
 void onMessage(Message message)
           
protected  Destination processReplyToDestination(Destination destination)
           
protected abstract  void sendMessage(Message message)
           
 void setConsumer(MessageConsumer consumer)
           
protected  void setDoHandleReplyTo(boolean doHandleReplyTo)
           
 void setJmsConnector(JmsConnector connector)
           
 void setJmsMessageConvertor(JmsMesageConvertor jmsMessageConvertor)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

consumer

protected MessageConsumer consumer

started

protected AtomicBoolean started

jmsMessageConvertor

protected JmsMesageConvertor jmsMessageConvertor

doHandleReplyTo

protected boolean doHandleReplyTo

jmsConnector

protected JmsConnector jmsConnector
Constructor Detail

DestinationBridge

public DestinationBridge()
Method Detail

getConsumer

public MessageConsumer getConsumer()
Returns:
Returns the consumer.

setConsumer

public void setConsumer(MessageConsumer consumer)
Parameters:
consumer - The consumer to set.

setJmsConnector

public void setJmsConnector(JmsConnector connector)
Parameters:
connector -

getJmsMessageConvertor

public JmsMesageConvertor getJmsMessageConvertor()
Returns:
Returns the inboundMessageConvertor.

setJmsMessageConvertor

public void setJmsMessageConvertor(JmsMesageConvertor jmsMessageConvertor)
Parameters:
jmsMessageConvertor -

processReplyToDestination

protected Destination processReplyToDestination(Destination destination)

start

public void start()
           throws Exception
Specified by:
start in interface Service
Throws:
Exception

stop

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

onMessage

public void onMessage(Message message)
Specified by:
onMessage in interface MessageListener

isDoHandleReplyTo

protected boolean isDoHandleReplyTo()
Returns:
Returns the doHandleReplyTo.

setDoHandleReplyTo

protected void setDoHandleReplyTo(boolean doHandleReplyTo)
Parameters:
doHandleReplyTo - The doHandleReplyTo to set.

createConsumer

protected abstract MessageConsumer createConsumer()
                                           throws JMSException
Throws:
JMSException

createProducer

protected abstract MessageProducer createProducer()
                                           throws JMSException
Throws:
JMSException

sendMessage

protected abstract void sendMessage(Message message)
                             throws JMSException
Throws:
JMSException

getConnnectionForConsumer

protected abstract Connection getConnnectionForConsumer()

getConnectionForProducer

protected abstract Connection getConnectionForProducer()


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.