WebSphere MQ class: JMSObjectMessage
java.lang.Object | +----com.ibm.jms.JMSMessage | +----com.ibm.jms.JMSObjectMessage |
An ObjectMessage is used to send a message that contains a serializable Java object. It inherits from Message and adds a body containing a single Java reference. Only Serializable Java objects can be used.
See also: BytesMessage, MapMessage, Message, StreamMessage and TextMessage
public java.io.Serializable getObject() throws JMSException
Get the serializable object containing this message's data. The default value is null.
public void setObject(java.io.Serializable object) throws JMSException
Set the serializable object containing this message's data. The ObjectMessage contains a snapshot of the object at the time setObject() is called. Subsequent modifications of the object have no effect on the ObjectMessage body.