Package org.ow2.joram.jakarta.jms
Class TextMessage
- java.lang.Object
-
- org.ow2.joram.jakarta.jms.Message
-
- org.ow2.joram.jakarta.jms.TextMessage
-
- All Implemented Interfaces:
jakarta.jms.Message,jakarta.jms.TextMessage
public final class TextMessage extends Message implements jakarta.jms.TextMessage
Implements thejakarta.jms.TextMessageinterface.
-
-
Constructor Summary
Constructors Constructor Description TextMessage()Instantiates a bright newTextMessage.TextMessage(Session session, Message momMsg)Instantiates aTextMessagewrapping a consumed MOM message containing a text.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> TgetEffectiveBody(Class<T> c)Get message bodyStringgetText()API method.voidsetText(String text)API method.-
Methods inherited from class org.ow2.joram.jakarta.jms.Message
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, 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
-
-
-
-
Method Detail
-
setText
public void setText(String text) throws jakarta.jms.MessageNotWriteableException, jakarta.jms.MessageFormatException
API method. Sets a String as the body of the message.- Specified by:
setTextin interfacejakarta.jms.TextMessage- Parameters:
text- the String containing the message's data.- Throws:
jakarta.jms.MessageNotWriteableException- When trying to set the text if the message body is read-only.jakarta.jms.MessageFormatException- If the text serialization fails.
-
getText
public String getText() throws jakarta.jms.JMSException
API method. Returns the text body of the message, null if none.- Specified by:
getTextin interfacejakarta.jms.TextMessage- Returns:
- the String containing this message's data.
- Throws:
jakarta.jms.JMSException- In case of a problem when getting the body.
-
getEffectiveBody
protected <T> T getEffectiveBody(Class<T> c) throws jakarta.jms.JMSException
Description copied from class:MessageGet message body- Overrides:
getEffectiveBodyin classMessage- Parameters:
c- The type to which the message body will be assigned.- Returns:
- message body
- Throws:
jakarta.jms.JMSException- if the JMS provider fails to return a value due to some internal error.
-
-