|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mqe.jms.MQeMessage | +--com.ibm.mqe.jms.MQeObjectMessage
An ObjectMessage
is used to send a message that contains a serializable
Java object. It inherits from MQeMessage
and adds a body
containing a single Java reference. Only Serializable Java
objects can be used. If a collection of Java objects must be sent, one
of the collection classes provided in 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 MQeMessage.clearBody()
is
called, the message can now be both read from and written to.
BytesMessage
,
MapMessage
,
Message
,
ObjectMessage
,
StreamMessage
,
TextMessage
Field Summary |
Fields inherited from class com.ibm.mqe.jms.MQeMessage |
DEFAULT_DELIVERY_MODE |
Fields inherited from interface javax.jms.Message |
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE |
Constructor Summary | |
MQeObjectMessage()
|
Method Summary | |
java.io.Serializable |
getObject()
Get the serializable object contained in the message body. |
void |
setObject(java.io.Serializable object)
Set 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, clearBody, 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 MQeObjectMessage()
Method Detail |
public void setObject(java.io.Serializable object) throws javax.jms.JMSException
setObject
in interface javax.jms.ObjectMessage
object
- the message's data
javax.jms.JMSException
- if JMS fails to set the message body due to
some internal JMS error.
javax.jms.MessageFormatException
- if object serialization fails
javax.jms.MessageNotWriteableException
- if message in read-only mode.public java.io.Serializable getObject() throws javax.jms.JMSException
getObject
in interface javax.jms.ObjectMessage
javax.jms.JMSException
- if JMS fails to get the object due to
some internal JMS error.
javax.jms.MessageFormatException
- if object deserialization fails
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |