com.ibm.jms
Class JMSObjectMessage
- java.lang.Object
-
- com.ibm.jms.JMSMessage
-
- com.ibm.jms.JMSObjectMessage
-
- All Implemented Interfaces:
- JmsMessage, java.io.Serializable, javax.jms.Message, javax.jms.ObjectMessage
public class JMSObjectMessage extends JMSMessage implements javax.jms.ObjectMessage
An ObjectMessage is used to send a message that contains a serializable Java Object. It inherits fromJMSMessage
and adds a body containing a single Serializable Java Object.If more than one Java Object must be sent, one of the Collection classes can be used.
When a client receives an ObjectMessage, it is in read-only mode. If a client attempts to write to the message at this point, a MessageNotWriteableException is thrown. If clearBody() is called, the message can then be both read from and written to.
To create an object message please call
Session.createObjectMessage()
. Do not call the default constructor.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
sccsid
The SCCSID which is expanded when the file is extracted from CMVC
-
Constructor Summary
Constructors Constructor and Description JMSObjectMessage()
Deprecated.
-
Method Summary
Methods Modifier and Type Method and Description java.io.Serializable
getObject()
Get the serializable Object containing this message's data.void
setObject(java.io.Serializable object)
Sets the serializable Object containing this message's data.-
Methods inherited from class com.ibm.jms.JMSMessage
acknowledge, clearBody, clearProperties, getBody, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, isBodyAssignableTo, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty, toString, updateFromMessage
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.jms.Message
acknowledge, clearBody, clearProperties, getBody, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, isBodyAssignableTo, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty
-
Methods inherited from interface com.ibm.msg.client.jms.JmsMessage
getDelegate
-
-
-
-
Field Detail
-
sccsid
public static final java.lang.String sccsid
The SCCSID which is expanded when the file is extracted from CMVC- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JMSObjectMessage
public JMSObjectMessage()
Deprecated.To create an object message please call
Session.createObjectMessage()
.Do not call this default constructor.
-
-
Method Detail
-
getObject
public java.io.Serializable getObject() throws javax.jms.JMSException
Get the serializable Object containing this message's data. The default value is null.- Specified by:
getObject
in interfacejavax.jms.ObjectMessage
- Returns:
- the serializable Object containing this message's data
- Throws:
javax.jms.JMSException
- if an internal error occurs
-
setObject
public void setObject(java.io.Serializable object) throws javax.jms.JMSException
Sets the serializable Object containing this message's data.- Specified by:
setObject
in interfacejavax.jms.ObjectMessage
- Parameters:
object
- the message's data- Throws:
javax.jms.JMSException
- if the message is not writable or if some internal error occursjavax.jms.MessageFormatException
- if object serialization fails
-
-