org.marketcetera.client.jms
Class JMSMessageConverter
java.lang.Object
org.marketcetera.client.jms.JMSMessageConverter
- All Implemented Interfaces:
- MessageConverter
public class JMSMessageConverter
- extends Object
- implements MessageConverter
Converts trading messages to be able to send them over JMS.
This class is not meant to be used by clients of this package.
- Since:
- 1.0.0
- Version:
- $Id: JMSMessageConverter.java 16154 2012-07-14 16:34:05Z colin $
- Author:
- anshul@marketcetera.com
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JMSMessageConverter
public JMSMessageConverter()
fromMessage
public Object fromMessage(Message message)
throws JMSException,
MessageConversionException
- Converts a JMS Message to a trade message.
- Specified by:
fromMessage in interface MessageConverter
- Parameters:
message - the received JMS message. It should be of type
ObjectMessage.
- Returns:
- the trade message converted from the supplied JMS message.
- Throws:
JMSException - if there were errors extracting the contents
of the JMS message.
MessageConversionException - if there were errors converting
the contents of the JMS message to a trade message.
toMessage
public Message toMessage(Object inObject,
Session session)
throws JMSException,
MessageConversionException
- Converts a trade message to a JMS Message.
- Specified by:
toMessage in interface MessageConverter
- Parameters:
inObject - the message to be converted. It should either be
an order or a report.session - the JMS Session instance.
- Returns:
- the JMS message.
- Throws:
JMSException - if there were errors serializing the
trade message.
MessageConversionException - if the supplied object was not
an acceptable trade message.
Copyright © 2012. All Rights Reserved.