Class TextMessageImpl

  • All Implemented Interfaces:
    java.io.Serializable, javax.jms.Message, javax.jms.TextMessage

    public class TextMessageImpl
    extends MessageImpl
    implements javax.jms.TextMessage
    Implementation of a TextMessage.
    Author:
    IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
    See Also:
    Serialized Form
    • Constructor Detail

      • TextMessageImpl

        public TextMessageImpl()
    • Method Detail

      • writeBody

        protected void writeBody​(java.io.DataOutput out)
                          throws java.io.IOException
        Overrides:
        writeBody in class MessageImpl
        Throws:
        java.io.IOException
      • readBody

        protected void readBody​(java.io.DataInput in)
                         throws java.io.IOException
        Overrides:
        readBody in class MessageImpl
        Throws:
        java.io.IOException
      • getText

        public java.lang.String getText()
                                 throws javax.jms.JMSException
        Get the string containing this message's data. The default value is null.
        Specified by:
        getText in interface javax.jms.TextMessage
        Returns:
        the String containing the message's data
        Throws:
        javax.jms.JMSException - if JMS fails to get text due to some internal JMS error.
      • setText

        public void setText​(java.lang.String s)
                     throws javax.jms.JMSException
        Set the string containing this message's data.
        Specified by:
        setText in interface javax.jms.TextMessage
        Parameters:
        s - the String containing the message's data
        Throws:
        javax.jms.JMSException - if JMS fails to set text due to some internal JMS error.
        javax.jms.MessageNotWriteableException - if message in read-only mode.
      • clearBody

        public void clearBody()
                       throws javax.jms.JMSException
        Clear out the message body. All other parts of the message are left untouched.
        Specified by:
        clearBody in interface javax.jms.Message
        Overrides:
        clearBody in class MessageImpl
        Throws:
        javax.jms.JMSException - if JMS fails to due to some internal JMS error.