com.j_spaces.jms.utils
Class ObjectMessage2ObjectConverter

java.lang.Object
  extended by 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.


Constructor Summary
ObjectMessage2ObjectConverter()
           
 
Method Summary
 Object toObject(Message msg)
          If msg is a JMS ObjectMessage, it returns the containing POJO.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectMessage2ObjectConverter

public ObjectMessage2ObjectConverter()
Method Detail

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.