Class ActiveMQTextMessage

All Implemented Interfaces:
jakarta.jms.Message, jakarta.jms.TextMessage, MessageReference, Command, DataStructure, MarshallAware, Message, ScheduledMessage

public class ActiveMQTextMessage extends ActiveMQMessage implements jakarta.jms.TextMessage
  • Field Details

  • Constructor Details

    • ActiveMQTextMessage

      public ActiveMQTextMessage()
  • Method Details

    • copy

      public Message copy()
      Overrides:
      copy in class ActiveMQMessage
    • getDataStructureType

      public byte getDataStructureType()
      Specified by:
      getDataStructureType in interface DataStructure
      Overrides:
      getDataStructureType in class ActiveMQMessage
      Returns:
      The type of the data structure
    • getJMSXMimeType

      public String getJMSXMimeType()
      Description copied from interface: Message
      Returns the MIME type of this mesage. This can be used in selectors to filter on the MIME types of the different JMS messages, or in the case of BlobMessage it allows you to create a selector on the MIME type of the BLOB body
      Specified by:
      getJMSXMimeType in interface Message
      Overrides:
      getJMSXMimeType in class ActiveMQMessage
    • setText

      public void setText(String text) throws jakarta.jms.MessageNotWriteableException
      Specified by:
      setText in interface jakarta.jms.TextMessage
      Throws:
      jakarta.jms.MessageNotWriteableException
    • getText

      public String getText() throws jakarta.jms.JMSException
      Specified by:
      getText in interface jakarta.jms.TextMessage
      Throws:
      jakarta.jms.JMSException
    • beforeMarshall

      public void beforeMarshall(WireFormat wireFormat) throws IOException
      Specified by:
      beforeMarshall in interface MarshallAware
      Overrides:
      beforeMarshall in class Message
      Throws:
      IOException
    • storeContentAndClear

      public void storeContentAndClear()
      Overrides:
      storeContentAndClear in class ActiveMQMessage
    • storeContent

      public void storeContent()
      Overrides:
      storeContent in class ActiveMQMessage
    • clearUnMarshalledState

      public void clearUnMarshalledState() throws jakarta.jms.JMSException
      Overrides:
      clearUnMarshalledState in class Message
      Throws:
      jakarta.jms.JMSException
    • isContentMarshalled

      public boolean isContentMarshalled()
      Overrides:
      isContentMarshalled in class ActiveMQMessage
    • clearBody

      public void clearBody() throws jakarta.jms.JMSException
      Clears out the message body. Clearing a message's body does not clear its header values or property entries.

      If this message body was read-only, calling this method leaves the message body in the same state as an empty body in a newly created message.

      Specified by:
      clearBody in interface jakarta.jms.Message
      Overrides:
      clearBody in class ActiveMQMessage
      Throws:
      jakarta.jms.JMSException - if the JMS provider fails to clear the message body due to some internal error.
    • getSize

      public int getSize()
      Specified by:
      getSize in interface MessageReference
      Overrides:
      getSize in class Message
    • toString

      public String toString()
      Overrides:
      toString in class Message
    • isBodyAssignableTo

      public boolean isBodyAssignableTo(Class c) throws jakarta.jms.JMSException
      Specified by:
      isBodyAssignableTo in interface jakarta.jms.Message
      Overrides:
      isBodyAssignableTo in class ActiveMQMessage
      Throws:
      jakarta.jms.JMSException
    • doGetBody

      protected <T> T doGetBody(Class<T> asType) throws jakarta.jms.JMSException
      Overrides:
      doGetBody in class ActiveMQMessage
      Throws:
      jakarta.jms.JMSException