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 String` | `JMSXGROUPSEQ`
    `static String` | `JMSXUSERID`
    `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 int` | `getIntProperty(Message message, String name)`
    `static String` | `getJMSCorrelationID(Message message)`
    `static byte[]` | `getJMSCorrelationIDAsBytes(Message message)`
    `static SimpleString` | `getJMSReplyTo(Message message)`
    `static String` | `getJMSType(Message message)`
    `static long` | `getLongProperty(Message message, String name)`
    `static Object` | `getObjectProperty(Message message, String name)`
    `static Set<String>` | `getPropertyNames(Message message)`
    `static String` | `getStringProperty(Message message, String name)`
    `static boolean` | `propertyExists(Message message, String name)`
    `static void` | `setIntProperty(Message message, String name, int value)`
    `static void` | `setJMSCorrelationID(Message message, String correlationID)`
    `static void` | `setJMSCorrelationIDAsBytes(Message message, byte[] correlationID)`
    `static void` | `setJMSReplyTo(Message message, SimpleString dest)`
    `static void` | `setJMSReplyTo(Message message, String dest)`
    `static void` | `setJMSType(Message message, String type)`
    `static void` | `setLongProperty(Message message, String name, long value)`
    `static void` | `setObjectProperty(Message message, String name, Object value)`
    `static void` | `setStringProperty(Message message, String name, String value)`

    - ### 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

    - #### JMSXGROUPSEQ

          public static final String JMSXGROUPSEQ

      See Also:
        Constant Field Values

    - #### JMSXUSERID

          public static final String JMSXUSERID

      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,
                                           String dest)

    - #### 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)

    - #### getStringProperty

          public static String getStringProperty(Message message,
                                                 String name)

    - #### getObjectProperty

          public static Object getObjectProperty(Message message,
                                                 String name)

    - #### getLongProperty

          public static long getLongProperty(Message message,
                                             String name)

    - #### getIntProperty

          public static int getIntProperty(Message message,
                                           String name)

    - #### setIntProperty

          public static void setIntProperty(Message message,
                                            String name,
                                            int value)

    - #### setLongProperty

          public static void setLongProperty(Message message,
                                             String name,
                                             long value)

    - #### setStringProperty

          public static void setStringProperty(Message message,
                                               String name,
                                               String value)

    - #### setObjectProperty

          public static void setObjectProperty(Message message,
                                               String name,
                                               Object value)

Copyright © 2019 The Apache Software Foundation. All rights reserved.