public class StompJmsObjectMessage extends StompJmsMessage implements javax.jms.ObjectMessage
ObjectMessage object is used to send a message that contains
a serializable object in the Java programming language ("Java object"). It
inherits from the Message interface and adds a body containing a
single reference to an object. Only Serializable Java objects
can be used.
If a collection of Java objects must be sent, one of the
Collection classes provided since JDK 1.2 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 now be both read from and
written to.Session.createObjectMessage(),
Session.createObjectMessage(Serializable),
BytesMessage,
MapMessage,
Message,
StreamMessage,
TextMessageStompJmsMessage.JmsMsgType| Modifier and Type | Field and Description |
|---|---|
protected java.io.Serializable |
object |
acknowledgeCallback, connection, frame, properties, readOnlyBody, readOnlyProperties, REVERSED_HEADER_NAMES, transactionId| Constructor and Description |
|---|
StompJmsObjectMessage() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearBody()
Clears out the message body.
|
StompJmsMessage |
copy() |
StompJmsMessage.JmsMsgType |
getMsgType() |
java.io.Serializable |
getObject()
Gets the serializable object containing this message's data.
|
void |
setObject(java.io.Serializable newObject)
Sets the serializable object containing this message's data.
|
void |
storeContent()
serialize the payload
|
java.lang.String |
toString() |
acknowledge, checkReadOnlyBody, checkValidObject, clearProperties, copy, decodeString, encodeString, equals, getAcknowledgeCallback, getAllPropertyNames, getBooleanProperty, getByteProperty, getConnection, getConsumerId, getContent, getDoubleProperty, getFloatProperty, getFrame, getHeaderMap, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getMessageID, getObjectProperty, getProperties, getPropertyNames, getRedeliveryCounter, getShortProperty, getStompJmsDestination, getStompJmsReplyTo, getStringProperty, getTransactionId, hashCode, isPersistent, isRedelivered, lazyCreateProperties, onSend, propertyExists, removeProperty, setAcknowledgeCallback, setBooleanProperty, setBooleanProperty, setByteProperty, setConnection, setContent, setDoubleProperty, setFloatProperty, setFrame, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setMessageID, setObjectProperty, setObjectProperty, setPersistent, setProperties, setProperty, setReadOnlyBody, setReadOnlyProperties, setRedelivered, setRedeliveryCounter, setShortProperty, setStringProperty, setTransactionIdclone, finalize, getClass, notify, notifyAll, wait, wait, waitacknowledge, clearProperties, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringPropertypublic StompJmsMessage.JmsMsgType getMsgType()
getMsgType in class StompJmsMessagepublic StompJmsMessage copy() throws javax.jms.JMSException
copy in class StompJmsMessagejavax.jms.JMSExceptionpublic void storeContent()
throws javax.jms.JMSException
StompJmsMessagestoreContent in class StompJmsMessagejavax.jms.JMSExceptionpublic void clearBody()
throws javax.jms.JMSException
clearBody in interface javax.jms.MessageclearBody in class StompJmsMessagejavax.jms.JMSException - if the JMS provider fails to clear the message body due to
some internal error.public void setObject(java.io.Serializable newObject)
throws javax.jms.JMSException
ObjectMessage contains a snapshot
of the object at the time setObject() is called; subsequent
modifications of the object will have no effect on the
ObjectMessage body.setObject in interface javax.jms.ObjectMessagenewObject - the message's datajavax.jms.JMSException - if the JMS provider fails to set the object due to some
internal error.javax.jms.MessageFormatException - if object serialization fails.javax.jms.MessageNotWriteableException - if the message is in read-only mode.public java.io.Serializable getObject()
throws javax.jms.JMSException
getObject in interface javax.jms.ObjectMessagejavax.jms.JMSExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2010-2014 FuseSource, Corp.. All Rights Reserved.