jrun.jms.core.message
Class TextMessageImpl

jrun.jms.core.message.TextMessageImpl

public final class TextMessageImpl

This class implements the TextMessage interface

Version:
$Revision: 1.5 $ $Date: 2001/08/06 03:01:28 $
Author:
Jim Mourikis
See Also:
TextMessage

Constructor Summary
TextMessageImpl()
          Construct a new TextMessage
 
Method Summary
 void clearBody()
          Clear out the message body.
 java.lang.Object clone()
          Clone an instance of this object
 java.lang.String getText()
          Get the string containing this message's data.
 void readExternal(java.io.ObjectInput in)
          Serialize in this message's data
 void setText(java.lang.String string)
          Set the string containing this message's data.
 void writeExternal(java.io.ObjectOutput out)
          Serialize out this message's data
 

Constructor Detail

TextMessageImpl

public TextMessageImpl()
                throws javax.jms.JMSException
Construct a new TextMessage
Throws:
JMSException - if the message type can't be set
Method Detail

clone

public final java.lang.Object clone()
                             throws java.lang.CloneNotSupportedException
Clone an instance of this object
Returns:
a copy of this object
Throws:
java.lang.CloneNotSupportedException - if object or attributes aren't cloneable

writeExternal

public final void writeExternal(java.io.ObjectOutput out)
                         throws java.io.IOException
Serialize out this message's data
Parameters:
out - the stream to serialize out to
Throws:
java.io.IOException - if any I/O exceptions occurr

readExternal

public final void readExternal(java.io.ObjectInput in)
                        throws java.lang.ClassNotFoundException,
                               java.io.IOException
Serialize in this message's data
Parameters:
in - the stream to serialize in from
Throws:
java.lang.ClassNotFoundException - if the class for an object being restored cannot be found.
java.io.IOException - if any I/O exceptions occur

setText

public final void setText(java.lang.String string)
                   throws javax.jms.MessageNotWriteableException
Set the string containing this message's data.
Parameters:
string - the String containing the message's data
Throws:
MessageNotWriteableException - if message in read-only mode.

getText

public final java.lang.String getText()
Get the string containing this message's data. The default value is null.
Returns:
the String containing the message's data

clearBody

public final void clearBody()
                     throws javax.jms.JMSException
Clear out the message body. Clearing a message's body does not clear its header values or property entries. If this message body was read-only, calling this method leaves the message body is in the same state as an empty body in a newly created message


Copyright � 2002 Macromedia Corporation. All Rights Reserved.