Class TextMessageImpl

java.lang.Object
com.swiftmq.jms.MessageImpl
com.swiftmq.jms.TextMessageImpl
All Implemented Interfaces:
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:
  • Constructor Details

    • TextMessageImpl

      public TextMessageImpl()
  • Method Details

    • getType

      protected int getType()
      Overrides:
      getType in class MessageImpl
    • unfoldBody

      protected void unfoldBody()
      Overrides:
      unfoldBody in class MessageImpl
    • writeBody

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

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

      public 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(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.
    • setReadOnly

      public void setReadOnly(boolean b)
      Overrides:
      setReadOnly in class MessageImpl
    • 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.
    • toString

      public String toString()
      Overrides:
      toString in class MessageImpl