org.apache.activemq.network.jms
Class DestinationBridge
java.lang.Object
org.apache.activemq.network.jms.DestinationBridge
- All Implemented Interfaces:
- javax.jms.MessageListener, Service
- Direct Known Subclasses:
- InboundQueueBridge, InboundTopicBridge, OutboundQueueBridge, OutboundTopicBridge
public abstract class DestinationBridge
- extends java.lang.Object
- implements Service, javax.jms.MessageListener
A Destination bridge is used to bridge between to different JMS systems
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
consumer
protected javax.jms.MessageConsumer consumer
started
protected java.util.concurrent.atomic.AtomicBoolean started
jmsMessageConvertor
protected JmsMesageConvertor jmsMessageConvertor
doHandleReplyTo
protected boolean doHandleReplyTo
jmsConnector
protected JmsConnector jmsConnector
DestinationBridge
public DestinationBridge()
getConsumer
public javax.jms.MessageConsumer getConsumer()
- Returns:
- Returns the consumer.
setConsumer
public void setConsumer(javax.jms.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
-
getMaximumRetries
public int getMaximumRetries()
setMaximumRetries
public void setMaximumRetries(int maximumRetries)
- Sets the maximum number of retries if a send fails before closing the
bridge
processReplyToDestination
protected javax.jms.Destination processReplyToDestination(javax.jms.Destination destination)
start
public void start()
throws java.lang.Exception
- Specified by:
start
in interface Service
- Throws:
java.lang.Exception
stop
public void stop()
throws java.lang.Exception
- Specified by:
stop
in interface Service
- Throws:
java.lang.Exception
onMessage
public void onMessage(javax.jms.Message message)
- Specified by:
onMessage
in interface javax.jms.MessageListener
isDoHandleReplyTo
protected boolean isDoHandleReplyTo()
- Returns:
- Returns the doHandleReplyTo.
setDoHandleReplyTo
protected void setDoHandleReplyTo(boolean doHandleReplyTo)
- Parameters:
doHandleReplyTo
- The doHandleReplyTo to set.
createConsumer
protected abstract javax.jms.MessageConsumer createConsumer()
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
createProducer
protected abstract javax.jms.MessageProducer createProducer()
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
sendMessage
protected abstract void sendMessage(javax.jms.Message message)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
getConnnectionForConsumer
protected abstract javax.jms.Connection getConnnectionForConsumer()
getConnectionForProducer
protected abstract javax.jms.Connection getConnectionForProducer()
restartProducer
protected void restartProducer()
throws javax.jms.JMSException,
javax.naming.NamingException
- Throws:
javax.jms.JMSException
javax.naming.NamingException
Copyright © 2005-2012. All Rights Reserved.