|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atomikos.jms.AbstractBridge
public abstract class AbstractBridge
An abstract superclass for transactional destination bridging between a receiver and a sender destination. The destination is set explicitly as a MessageProducerSessionFactory, whereas the source is set implicitly by setting a bridge instance as the MessageListener to a Queue(Topic)ReceiverSession or Queue(Topic)ReceiverSessionPool. Subclasses should implement the bridgeMessage method to convert the JMS message format from the source session to the destination.
Constructor Summary | |
---|---|
protected |
AbstractBridge()
|
Method Summary | |
---|---|
protected abstract javax.jms.Message |
bridgeMessage(javax.jms.Message message)
Transform a message into another message. |
protected void |
copyHeadersAndProperties(javax.jms.Message fromMessage,
javax.jms.Message toMessage)
Utility method to copy the headers from one message to another. |
protected javax.jms.BytesMessage |
createBytesMessage()
Create a new bytes message. |
protected javax.jms.MapMessage |
createMapMessage()
Create a new map message. |
protected javax.jms.ObjectMessage |
createObjectMessage()
Create a new object message. |
protected javax.jms.StreamMessage |
createStreamMessage()
Create a new stream message. |
protected javax.jms.TextMessage |
createTextMessage()
Create a new text message. |
void |
onMessage(javax.jms.Message message)
This method is called by the source session when there is an incoming message. |
void |
setDestinationSessionFactory(MessageProducerSessionFactory destinationFactory)
Set the destination session factory; this is a sender session factory that connects to the destination in the destination domain. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractBridge()
Method Detail |
---|
public void setDestinationSessionFactory(MessageProducerSessionFactory destinationFactory)
destinationFactory
- protected javax.jms.TextMessage createTextMessage() throws javax.jms.JMSException
javax.jms.JMSException
protected javax.jms.BytesMessage createBytesMessage() throws javax.jms.JMSException
javax.jms.JMSException
protected javax.jms.StreamMessage createStreamMessage() throws javax.jms.JMSException
javax.jms.JMSException
protected javax.jms.ObjectMessage createObjectMessage() throws javax.jms.JMSException
javax.jms.JMSException
protected javax.jms.MapMessage createMapMessage() throws javax.jms.JMSException
javax.jms.JMSException
protected void copyHeadersAndProperties(javax.jms.Message fromMessage, javax.jms.Message toMessage) throws javax.jms.JMSException
fromMessage
- The incoming messagetoMessage
- The bridged message as constructed by the subclass.
javax.jms.JMSException
protected abstract javax.jms.Message bridgeMessage(javax.jms.Message message) throws javax.jms.JMSException
message
- The message as it comes from the source session (and queue).
javax.jms.JMSException
public final void onMessage(javax.jms.Message message)
onMessage
in interface javax.jms.MessageListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |