|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.huihoo.jfox.ms.jms.message.MessageImpl
org.huihoo.jfox.ms.jms.message.ObjectMessageImpl
This class provides an implementation of the JMS ObjectMessage. 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.
| Field Summary |
| Fields inherited from interface javax.jms.Message |
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE |
| Constructor Summary | |
ObjectMessageImpl()
Default constructor |
|
| Method Summary | |
void |
clearBody()
Sets the object reference in the message to null and toggles the message to read/write state. |
java.io.Serializable |
getObject()
Gets 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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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 |
| Constructor Detail |
public ObjectMessageImpl()
| Method Detail |
public void setObject(java.io.Serializable object)
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.ObjectMessageobject - 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.ObjectMessage.setObject(Serializable)
public java.io.Serializable getObject()
throws javax.jms.JMSException
getObject in interface javax.jms.ObjectMessagejavax.jms.JMSException - if the JMS provider fails to get the object due to some
internal error.
javax.jms.MessageFormatException - if object deserialization fails.ObjectMessage.getObject()
public void clearBody()
throws javax.jms.JMSException
clearBody in interface javax.jms.MessageclearBody in class MessageImpljavax.jms.JMSException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||