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