org.apache.activemq.artemis.reader

## Class MessageUtil

- java.lang.Object
- - org.apache.activemq.artemis.reader.MessageUtil

- Direct Known Subclasses:
    BytesMessageUtil, MapMessageUtil, StreamMessageUtil, TextMessageUtil

      public class MessageUtil
      extends Object

  static methods intended for import static on JMS like messages. This provides a helper for core message to act some of the JMS functions used by the JMS wrapper

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static SimpleString` | `CONNECTION_ID_PROPERTY_NAME`
    `static SimpleString` | `CORRELATIONID_HEADER_NAME`
    `static SimpleString` | `JMS`
    `static SimpleString` | `JMS_`
    `static SimpleString` | `JMSX`
    `static String` | `JMSXDELIVERYCOUNT`
    `static String` | `JMSXGROUPID`
    `static SimpleString` | `REPLYTO_HEADER_NAME`
    `static SimpleString` | `TYPE_HEADER_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MessageUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `clearProperties(Message message)`
    `static String` | `getJMSCorrelationID(Message message)`
    `static byte[]` | `getJMSCorrelationIDAsBytes(Message message)`
    `static SimpleString` | `getJMSReplyTo(Message message)`
    `static String` | `getJMSType(Message message)`
    `static Set<String>` | `getPropertyNames(Message message)`
    `static boolean` | `propertyExists(Message message, String name)`
    `static void` | `setJMSCorrelationID(Message message, String correlationID)`
    `static void` | `setJMSCorrelationIDAsBytes(Message message, byte[] correlationID)`
    `static void` | `setJMSReplyTo(Message message, SimpleString dest)`
    `static void` | `setJMSType(Message message, String type)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CORRELATIONID_HEADER_NAME

          public static final SimpleString CORRELATIONID_HEADER_NAME

    - #### REPLYTO_HEADER_NAME

          public static final SimpleString REPLYTO_HEADER_NAME

    - #### TYPE_HEADER_NAME

          public static final SimpleString TYPE_HEADER_NAME

    - #### JMS

          public static final SimpleString JMS

    - #### JMSX

          public static final SimpleString JMSX

    - #### JMS_

          public static final SimpleString JMS_

    - #### JMSXDELIVERYCOUNT

          public static final String JMSXDELIVERYCOUNT

      See Also:
        Constant Field Values

    - #### JMSXGROUPID

          public static final String JMSXGROUPID

      See Also:
        Constant Field Values

    - #### CONNECTION_ID_PROPERTY_NAME

          public static final SimpleString CONNECTION_ID_PROPERTY_NAME

  - ### Constructor Detail

    - #### MessageUtil

          public MessageUtil()

  - ### Method Detail

    - #### getJMSCorrelationIDAsBytes

          public static byte[] getJMSCorrelationIDAsBytes(Message message)

    - #### setJMSType

          public static void setJMSType(Message message,
                                        String type)

    - #### getJMSType

          public static String getJMSType(Message message)

    - #### setJMSCorrelationIDAsBytes

          public static final void setJMSCorrelationIDAsBytes(Message message,
                                                              byte[] correlationID)
                                                       throws ActiveMQException

      Throws:
        `ActiveMQException`

    - #### setJMSCorrelationID

          public static void setJMSCorrelationID(Message message,
                                                 String correlationID)

    - #### getJMSCorrelationID

          public static String getJMSCorrelationID(Message message)

    - #### getJMSReplyTo

          public static SimpleString getJMSReplyTo(Message message)

    - #### setJMSReplyTo

          public static void setJMSReplyTo(Message message,
                                           SimpleString dest)

    - #### clearProperties

          public static void clearProperties(Message message)

    - #### getPropertyNames

          public static Set<String> getPropertyNames(Message message)

    - #### propertyExists

          public static boolean propertyExists(Message message,
                                               String name)

Copyright © 2017. All rights reserved.