|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fusesource.stompjms.message.StompJmsMessage
org.fusesource.stompjms.message.StompJmsObjectMessage
public class StompJmsObjectMessage
An 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.
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,
TextMessage| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.fusesource.stompjms.message.StompJmsMessage |
|---|
StompJmsMessage.JmsMsgType |
| Field Summary | |
|---|---|
protected java.io.Serializable |
object
|
| Fields inherited from class org.fusesource.stompjms.message.StompJmsMessage |
|---|
acknowledgeCallback, frame, properties, readOnlyBody, readOnlyProperties, redeliveryCounter, transactionId |
| Fields inherited from interface javax.jms.Message |
|---|
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE |
| Constructor Summary | |
|---|---|
StompJmsObjectMessage()
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.jms.Message |
|---|
acknowledge, 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, setStringProperty |
| Field Detail |
|---|
protected transient java.io.Serializable object
| Constructor Detail |
|---|
public StompJmsObjectMessage()
| Method Detail |
|---|
public StompJmsMessage.JmsMsgType getMsgType()
getMsgType in class StompJmsMessage
public StompJmsMessage copy()
throws javax.jms.JMSException
copy in class StompJmsMessagejavax.jms.JMSException
public void storeContent()
throws javax.jms.JMSException
StompJmsMessage
storeContent in class StompJmsMessagejavax.jms.JMSException
public 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 data
javax.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.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||