public class JMSTextMessage extends JMSMessage implements javax.jms.TextMessage
A TextMessage is used to send a message containing a java.lang.String. It inherits from
JMSMessage and adds a text body.
When a client receives a TextMessage, 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 then be both read from and written
to.
To create a text message please call Session.createTextMessage(). Do not call the default constructor.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
sccsid
The SCCSID which is expanded when the file is extracted from CMVC
|
| Constructor and Description |
|---|
JMSTextMessage()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getText()
Gets the String containing this message's data.
|
void |
setText(java.lang.String messageText)
Sets the String containing this message's data.
|
acknowledge, clearBody, clearProperties, getBody, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, isBodyAssignableTo, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty, toString, updateFromMessageequals, getClass, hashCode, notify, notifyAll, wait, wait, waitacknowledge, clearBody, clearProperties, getBody, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, isBodyAssignableTo, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringPropertygetDelegatepublic static final java.lang.String sccsid
public JMSTextMessage()
To create a text message please call Session.createTextMessage().
Do not call this default constructor.
public java.lang.String getText()
throws javax.jms.JMSException
getText in interface javax.jms.TextMessagejavax.jms.JMSException - if the character set is not supportedpublic void setText(java.lang.String messageText)
throws javax.jms.JMSException
setText in interface javax.jms.TextMessagemessageText - the String containing the message's datajavax.jms.JMSException - if an internal error occursjavax.jms.MessageNotWriteableException - if the message is in read-only mode