Package jakarta.jms

Interface TextMessage

    • Method Detail

      • setText

        void setText​(String string)
              throws JMSException
        Sets the string containing this message's data.
        Parameters:
        string - the String containing the message's data
        Throws:
        JMSException - if the Jakarta Messaging provider fails to set the text due to some internal error.
        MessageNotWriteableException - if the message is in read-only mode.
      • getText

        String getText()
                throws JMSException
        Gets the string containing this message's data. The default value is null.
        Returns:
        the String containing the message's data
        Throws:
        JMSException - if the Jakarta Messaging provider fails to get the text due to some internal error.