com.j_spaces.jms.utils
Class ObjectMessage2ObjectConverter
java.lang.Object
com.j_spaces.jms.utils.ObjectMessage2ObjectConverter
- All Implemented Interfaces:
- IMessageConverter
public class ObjectMessage2ObjectConverter
- extends Object
- implements IMessageConverter
This converter converts JMS ObjectMessages to their containing Object.
Method Summary |
Object |
toObject(Message msg)
If msg is a JMS ObjectMessage, it returns the containing POJO. |
ObjectMessage2ObjectConverter
public ObjectMessage2ObjectConverter()
toObject
public Object toObject(Message msg)
throws JMSException
- If msg is a JMS ObjectMessage, it returns the containing POJO.
Otherwise, it returns the same argument object.
- Specified by:
toObject
in interface IMessageConverter
- Parameters:
msg
- the JMS message to convert
- Returns:
- the convertion result
- Throws:
JMSException
- if there was a problem during the conversion.