public final class TextMessage extends Message implements TextMessage
javax.jms.TextMessage
interface.jmsDest, logger, momMsg, propertiesRO, RObody, session
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
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, 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, 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, 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
public void setText(String text) throws MessageNotWriteableException, MessageFormatException
setText
in interface TextMessage
text
- the String containing the message's data.MessageNotWriteableException
- When trying to set the text
if the message body is read-only.MessageFormatException
- If the text serialization fails.public String getText() throws JMSException
getText
in interface TextMessage
JMSException
- In case of a problem when getting the body.protected <T> T getEffectiveBody(Class<T> c) throws JMSException
Message
getEffectiveBody
in class Message
JMSException
- if the JMS provider fails to return a value due to some internal error.Copyright © 2016 ScalAgent D.T.. All Rights Reserved.