public class SQSTextMessage extends SQSMessage implements javax.jms.TextMessage
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 now be both read from and written to.
SQSMessage.JMSMessagePropertyValue, SQSMessage.TypeConversionSupportBYTE_MESSAGE_TYPE, JMS_SQS_CORRELATION_ID, JMS_SQS_MESSAGE_TYPE, JMS_SQS_REPLY_TO_QUEUE_NAME, JMS_SQS_REPLY_TO_QUEUE_URL, OBJECT_MESSAGE_TYPE, TEXT_MESSAGE_TYPE| Constructor and Description |
|---|
SQSTextMessage()
Create new empty TextMessage to send.
|
SQSTextMessage(Acknowledger acknowledger,
String queueUrl,
com.amazonaws.services.sqs.model.Message sqsMessage)
Convert received SQSMessage into TextMessage.
|
SQSTextMessage(String payload)
Create new TextMessage with payload to send.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearBody()
Sets the message body to write mode, and sets the text to null
|
String |
getText()
Gets the text containing this message's body.
|
void |
setText(String string)
Sets the text containing this message's body.
|
acknowledge, checkBodyWritePermissions, checkPropertyWritePermissions, clearProperties, convertExceptionToJMSException, convertExceptionToMessageFormatException, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSMessagePropertyValue, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getQueueUrl, getReceiptHandle, getShortProperty, getSQSMessageDeduplicationId, getSQSMessageGroupId, getSQSMessageId, getSQSMessageSequenceNumber, getStringProperty, propertyExists, setBodyWritePermissions, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setSequenceNumber, setShortProperty, setSQSMessageId, setStringPropertyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacknowledge, 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, setStringPropertypublic SQSTextMessage(Acknowledger acknowledger, String queueUrl, com.amazonaws.services.sqs.model.Message sqsMessage) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic SQSTextMessage()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic SQSTextMessage(String payload) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void setText(String string) throws javax.jms.JMSException
setText in interface javax.jms.TextMessagestring - The String containing the message's bodyMessageNotWriteableException - If the message is in read-only mode.javax.jms.JMSExceptionpublic String getText() throws javax.jms.JMSException
getText in interface javax.jms.TextMessageString containing the message's bodyjavax.jms.JMSExceptionpublic void clearBody()
throws javax.jms.JMSException
clearBody in interface javax.jms.MessageclearBody in class SQSMessagejavax.jms.JMSException - If directly calledCopyright © 2022. All rights reserved.