org.objectweb.joram.client.jms
Class TextMessage

java.lang.Object
  extended by org.objectweb.joram.client.jms.Message
      extended by org.objectweb.joram.client.jms.TextMessage
All Implemented Interfaces:
javax.jms.Message, javax.jms.TextMessage

public final class TextMessage
extends Message
implements javax.jms.TextMessage

Implements the javax.jms.TextMessage interface.


Field Summary
 
Fields inherited from class org.objectweb.joram.client.jms.Message
jmsDest, logger, momMsg, propertiesRO, RObody, session
 
Fields inherited from interface javax.jms.Message
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
 
Constructor Summary
TextMessage()
          Instantiates a bright new TextMessage.
TextMessage(Session session, Message momMsg)
          Instantiates a TextMessage wrapping a consumed MOM message containing a text.
 
Method Summary
 java.lang.String getText()
          Returns the text body of the message.
 void setText(java.lang.String text)
          Sets a String as the body of the message.
 
Methods inherited from class org.objectweb.joram.client.jms.Message
acknowledge, clearBody, clearProperties, convertJMSMessage, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getMomMsg, getObjectProperty, getOptionalHeader, getProperties, getPropertyNames, getShortProperty, getStringProperty, prepare, propertyExists, resetPropertiesRO, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setReadOnly, 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 javax.jms.Message
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
 

Constructor Detail

TextMessage

TextMessage()
Instantiates a bright new TextMessage.


TextMessage

TextMessage(Session session,
            Message momMsg)
Instantiates a TextMessage wrapping a consumed MOM message containing a text.

Parameters:
session - The consuming session.
momMsg - The MOM message to wrap.
Method Detail

setText

public void setText(java.lang.String text)
             throws javax.jms.MessageNotWriteableException
Sets a String as the body of the message. API method.

Specified by:
setText in interface javax.jms.TextMessage
Throws:
javax.jms.MessageNotWriteableException - When trying to set the text if the message body is read-only.

getText

public java.lang.String getText()
                         throws javax.jms.JMSException
Returns the text body of the message. API method.

Specified by:
getText in interface javax.jms.TextMessage
Throws:
javax.jms.JMSException - Actually never thrown.


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.