org.exolab.jms.message
Class TextMessageImpl

java.lang.Object
  |
  +--org.exolab.jms.message.MessageImpl
        |
        +--org.exolab.jms.message.TextMessageImpl
All Implemented Interfaces:
java.lang.Cloneable, java.io.Externalizable, Identifiable, javax.jms.Message, java.io.Serializable, javax.jms.TextMessage

public final class TextMessageImpl
extends MessageImpl
implements javax.jms.TextMessage

This class implements the javax.jms.TextMessage interface

Version:
$Revision: 1.10 $ $Date: 2003/08/17 01:32:24 $
Author:
Jim Mourikis
See Also:
TextMessage, Serialized Form

Fields inherited from class org.exolab.jms.message.MessageImpl
_acceptedTime, _bodyReadOnly, _connectionId, _processed, _propertiesReadOnly, _sequenceNumber, EMPTY
 
Fields inherited from interface javax.jms.Message
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
 
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.
 java.lang.String toString()
          Returns the message text
 void writeExternal(java.io.ObjectOutput out)
          Serialize out this message's data
 
Methods inherited from class org.exolab.jms.message.MessageImpl
acknowledge, checkPropertyWrite, checkRead, checkWrite, clearProperties, getAcceptedTime, getAckMessageID, getBooleanProperty, getByteProperty, getClientId, getConnectionId, getConsumerId, getDoubleProperty, getFloatProperty, getId, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getMessageId, getObjectProperty, getProcessed, getPropertyNames, getReadOnly, getSequenceNumber, getShortProperty, getStringProperty, getWildcard, isPersistent, isPriorityExpedited, propertyExists, setAcceptedTime, setBooleanProperty, setByteProperty, setClientId, setConnectionId, setConsumerId, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setJMSXRcvTimestamp, setLongProperty, setObjectProperty, setProcessed, setReadOnly, setSequenceNumber, setSession, setShortProperty, setStringProperty, setWildcard
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, 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
 

Constructor Detail

TextMessageImpl

public TextMessageImpl()
                throws javax.jms.JMSException
Construct a new TextMessage
Throws:
javax.jms.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
Overrides:
clone in class MessageImpl
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
Overrides:
writeExternal in class MessageImpl
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
Overrides:
readExternal in class MessageImpl
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.
Specified by:
setText in interface javax.jms.TextMessage
Parameters:
string - the String containing the message's data
Throws:
javax.jms.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.
Specified by:
getText in interface javax.jms.TextMessage
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
Specified by:
clearBody in interface javax.jms.Message
Overrides:
clearBody in class MessageImpl

toString

public final java.lang.String toString()
Returns the message text
Overrides:
toString in class java.lang.Object


Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.