com.ibm.jakarta.jms
Class JMSTextMessage
- java.lang.Object
-
- com.ibm.jakarta.jms.JMSMessage
-
- com.ibm.jakarta.jms.JMSTextMessage
-
- All Implemented Interfaces:
- JmsMessage, jakarta.jms.Message, jakarta.jms.TextMessage, java.io.Serializable
public class JMSTextMessage extends JMSMessage implements jakarta.jms.TextMessage
A TextMessage is used to send a message containing a java.lang.String. It inherits from
JMSMessageand 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
MessageNotWriteableExceptionis thrown. IfclearBody()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.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringsccsidThe SCCSID which is expanded when the file is extracted from CMVC
-
Constructor Summary
Constructors Constructor and Description JMSTextMessage()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringgetText()Gets the String containing this message's data.voidsetText(java.lang.String messageText)Sets the String containing this message's data.-
Methods inherited from class com.ibm.jakarta.jms.JMSMessage
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, updateFromMessage
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jakarta.jms.Message
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
-
Methods inherited from interface com.ibm.msg.client.jakarta.jms.JmsMessage
getDelegate
-
-
-
-
Field Detail
-
sccsid
public static final java.lang.String sccsid
The SCCSID which is expanded when the file is extracted from CMVC- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JMSTextMessage
public JMSTextMessage()
Deprecated.To create a text message please call
Session.createTextMessage().Do not call this default constructor.
-
-
Method Detail
-
getText
public java.lang.String getText() throws jakarta.jms.JMSExceptionGets the String containing this message's data. The default value is null.- Specified by:
getTextin interfacejakarta.jms.TextMessage- Returns:
- the message data in String form
- Throws:
jakarta.jms.JMSException- if the character set is not supported
-
setText
public void setText(java.lang.String messageText) throws jakarta.jms.JMSExceptionSets the String containing this message's data.- Specified by:
setTextin interfacejakarta.jms.TextMessage- Parameters:
messageText- the String containing the message's data- Throws:
jakarta.jms.JMSException- if an internal error occursjakarta.jms.MessageNotWriteableException- if the message is in read-only mode
-
-