org.apache.activemq.artemis.jms.client

## Class ActiveMQTextMessage

- java.lang.Object
- - org.apache.activemq.artemis.jms.client.ActiveMQMessage
  - - org.apache.activemq.artemis.jms.client.ActiveMQTextMessage

- All Implemented Interfaces:
    javax.jms.Message, javax.jms.TextMessage

      public class ActiveMQTextMessage
      extends ActiveMQMessage
      implements javax.jms.TextMessage

  ActiveMQ Artemis implementation of a JMS TextMessage.
  This class was ported from SpyTextMessage in JBossMQ.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static byte` | `TYPE`

    - ### Fields inherited from class org.apache.activemq.artemis.jms.client.ActiveMQMessage

      `message, propertiesReadOnly, readOnly`

    - ### Fields inherited from interface javax.jms.Message

      `DEFAULT_DELIVERY_DELAY, DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ActiveMQTextMessage(ClientMessage message, ClientSession session)`
    `ActiveMQTextMessage(ClientSession session)`
    `ActiveMQTextMessage(javax.jms.TextMessage foreign, ClientSession session)` A copy constructor for non-ActiveMQ Artemis JMS TextMessages.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearBody()`
    `void` | `doBeforeReceive()`
    `protected <T> T` | `getBodyInternal(Class<T> c)`
    `String` | `getText()`
    `byte` | `getType()`
    `boolean` | `isBodyAssignableTo(Class c)`
    `void` | `setText(String text)`

    - ### Methods inherited from class org.apache.activemq.artemis.jms.client.ActiveMQMessage

      `acknowledge, checkBuffer, checkRead, checkWrite, clearProperties, coreMaptoJMSMap, createMessage, doBeforeSend, getBody, getBooleanProperty, getByteProperty, getCoreMessage, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, hasNoBody, propertyExists, resetMessageID, saveToOutputStream, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIndividualAcknowledge, setInputStream, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setOutputStream, setShortProperty, setStringProperty, toString, waitCompletionOnStream`

    - ### 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, clearProperties, getBody, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty`

- - ### Field Detail

    - #### TYPE

          public static final byte TYPE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ActiveMQTextMessage

          public ActiveMQTextMessage(ClientSession session)

    - #### ActiveMQTextMessage

          public ActiveMQTextMessage(ClientMessage message,
                                     ClientSession session)

    - #### ActiveMQTextMessage

          public ActiveMQTextMessage(javax.jms.TextMessage foreign,
                                     ClientSession session)
                              throws javax.jms.JMSException

      A copy constructor for non-ActiveMQ Artemis JMS TextMessages.
      Throws:
        `javax.jms.JMSException`

  - ### Method Detail

    - #### getType

          public byte getType()

      Overrides:
        `getType` in class `ActiveMQMessage`

    - #### setText

          public void setText(String text)
                       throws javax.jms.JMSException

      Specified by:
        `setText` in interface `javax.jms.TextMessage`
      Throws:
        `javax.jms.JMSException`

    - #### getText

          public String getText()

      Specified by:
        `getText` in interface `javax.jms.TextMessage`

    - #### clearBody

          public void clearBody()
                         throws javax.jms.JMSException

      Specified by:
        `clearBody` in interface `javax.jms.Message`
      Overrides:
        `clearBody` in class `ActiveMQMessage`
      Throws:
        `javax.jms.JMSException`

    - #### doBeforeReceive

          public void doBeforeReceive()
                               throws ActiveMQException

      Overrides:
        `doBeforeReceive` in class `ActiveMQMessage`
      Throws:
        `ActiveMQException`

    - #### getBodyInternal

          protected <T> T getBodyInternal(Class<T> c)

      Overrides:
        `getBodyInternal` in class `ActiveMQMessage`

    - #### isBodyAssignableTo

          public boolean isBodyAssignableTo(Class c)

      Specified by:
        `isBodyAssignableTo` in interface `javax.jms.Message`
      Overrides:
        `isBodyAssignableTo` in class `ActiveMQMessage`

Copyright © 2016. All rights reserved.