public final class TextMessage extends Message implements jakarta.jms.TextMessage
jakarta.jms.TextMessage
interface.Constructor and Description |
---|
TextMessage()
Instantiates a bright new
TextMessage . |
TextMessage(Session session,
Message momMsg)
Instantiates a
TextMessage wrapping a consumed
MOM message containing a text. |
Modifier and Type | Method and Description |
---|---|
protected <T> T |
getEffectiveBody(Class<T> c)
Get message body
|
String |
getText()
API method.
|
void |
setText(String text)
API method.
|
acknowledge, clearBody, clearProperties, convertJMSMessage, dumpBody, dumpBody, getBody, getBooleanProperty, getByteProperty, getCompressedMinSize, getCompressionLevel, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getMomMsg, getObjectProperty, getProperties, getPropertyNames, getRawBody, getShortProperty, getStringProperty, isBodyAssignableTo, isCompressed, prepare, prepareJMSMessage, propertyExists, resetPropertiesRO, setBooleanProperty, setByteProperty, setCompressedMinSize, setCompressionLevel, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty, toString, toString, wrapMomMessage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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
public void setText(String text) throws jakarta.jms.MessageNotWriteableException, jakarta.jms.MessageFormatException
setText
in interface jakarta.jms.TextMessage
text
- the String containing the message's data.jakarta.jms.MessageNotWriteableException
- When trying to set the text
if the message body is read-only.jakarta.jms.MessageFormatException
- If the text serialization fails.public String getText() throws jakarta.jms.JMSException
getText
in interface jakarta.jms.TextMessage
jakarta.jms.JMSException
- In case of a problem when getting the body.protected <T> T getEffectiveBody(Class<T> c) throws jakarta.jms.JMSException
Message
getEffectiveBody
in class Message
c
- The type to which the message body will be assigned.jakarta.jms.JMSException
- if the JMS provider fails to return a value due to some internal error.Copyright © 2023 ScalAgent D.T.. All rights reserved.