|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
jrun.jms.core.message.ObjectMessageImpl
This class implements the ObjectMessage interface
An ObjectMessage is used to send a message that contains a serializable
Java object. It inherits from Message 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 clearBody is
called, the message can now be both read from and written to.
ObjectMessage| Constructor Summary | |
ObjectMessageImpl()
Construct a new ObjectMessage |
|
| Method Summary | |
void |
clearBody()
Clear out the message body. |
java.lang.Object |
clone()
Clone an instance of this object |
java.io.Serializable |
getObject()
Get the serializable object containing this message's data. |
void |
readExternal(java.io.ObjectInput in)
Serialize in this message's data |
void |
setObject(java.io.Serializable object)
Set the serializable object containing this message's data. |
void |
writeExternal(java.io.ObjectOutput out)
Serialize out this message's data |
| Constructor Detail |
public ObjectMessageImpl()
throws javax.jms.JMSException
JMSException - if the message type can't be set| Method Detail |
public final java.lang.Object clone()
throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException - if object or attributes aren't
cloneable
public final void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
out - the stream to serialize out tojava.io.IOException - if any I/O exceptions occurr
public final void readExternal(java.io.ObjectInput in)
throws java.lang.ClassNotFoundException,
java.io.IOException
in - the stream to serialize in fromjava.lang.ClassNotFoundException - if the class for an object being
restored cannot be found.java.io.IOException - if any I/O exceptions occur
public final void setObject(java.io.Serializable object)
throws javax.jms.MessageFormatException,
javax.jms.MessageNotWriteableException
ObjectMessage
contains a snapshot of the object at the time setObject()
is called - subsequent modifications of the object will have no
affect on the ObjectMessage body.object - the message's dataMessageFormatException - if object serialization failsMessageNotWriteableException - if the message is read-only
public final java.io.Serializable getObject()
throws javax.jms.MessageFormatException
MessageFormatException - if object deserialization fails
public final void clearBody()
throws javax.jms.JMSException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||