|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atomikos.jms.AbstractBridge
public abstract class AbstractBridge
Copyright © 2004, Atomikos. All rights reserved. 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 Message |
bridgeMessage(Message message)
Transform a message into another message. |
protected void |
copyHeadersAndProperties(Message fromMessage,
Message toMessage)
Utility method to copy the headers from one message to another. |
protected BytesMessage |
createBytesMessage()
Create a new bytes message. |
protected MapMessage |
createMapMessage()
Create a new map message. |
protected ObjectMessage |
createObjectMessage()
Create a new object message. |
protected StreamMessage |
createStreamMessage()
Create a new stream message. |
protected TextMessage |
createTextMessage()
Create a new text message. |
void |
onMessage(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 TextMessage createTextMessage() throws JMSException
JMSException
protected BytesMessage createBytesMessage() throws JMSException
JMSException
protected StreamMessage createStreamMessage() throws JMSException
JMSException
protected ObjectMessage createObjectMessage() throws JMSException
JMSException
protected MapMessage createMapMessage() throws JMSException
JMSException
protected void copyHeadersAndProperties(Message fromMessage, Message toMessage) throws JMSException
fromMessage
- The incoming messagetoMessage
- The bridged message as constructed by the subclass.
JMSException
protected abstract Message bridgeMessage(Message message) throws JMSException
message
- The message as it comes from the source session (and queue).
JMSException
public final void onMessage(Message message)
onMessage
in interface MessageListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |