Package org.apache.activemq.network.jms
Class SimpleJmsMessageConvertor
- java.lang.Object
-
- org.apache.activemq.network.jms.SimpleJmsMessageConvertor
-
- All Implemented Interfaces:
JmsMesageConvertor
public class SimpleJmsMessageConvertor extends Object implements JmsMesageConvertor
Converts Message from one JMS to another
-
-
Constructor Summary
Constructors Constructor Description SimpleJmsMessageConvertor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Message
convert(Message message)
Convert a foreign JMS Message to a native ActiveMQ Message - Inbound or visa-versa outbound.Message
convert(Message message, Destination replyTo)
Convert a foreign JMS Message to a native ActiveMQ Message - Inbound or visa-versa outbound.void
setConnection(Connection connection)
-
-
-
Method Detail
-
convert
public Message convert(Message message) throws JMSException
Convert a foreign JMS Message to a native ActiveMQ Message - Inbound or visa-versa outbound.- Specified by:
convert
in interfaceJmsMesageConvertor
- Parameters:
message
- The target message to convert to a native ActiveMQ message- Returns:
- the converted message
- Throws:
JMSException
-
convert
public Message convert(Message message, Destination replyTo) throws JMSException
Convert a foreign JMS Message to a native ActiveMQ Message - Inbound or visa-versa outbound. If the replyTo Destination instance is not null then the Message is configured with the given replyTo value.- Specified by:
convert
in interfaceJmsMesageConvertor
- Parameters:
message
- The target message to convert to a native ActiveMQ messagereplyTo
- The replyTo Destination to set on the converted Message.- Returns:
- the converted message
- Throws:
JMSException
-
setConnection
public void setConnection(Connection connection)
- Specified by:
setConnection
in interfaceJmsMesageConvertor
-
-