org.apache.cxf.message

## Class MessageUtils

- java.lang.Object
- - org.apache.cxf.message.MessageUtils

-     public final class MessageUtils
      extends Object

  Holder for utility methods relating to messages.

- - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `getContextualBoolean(Message m, String key)`
    `static boolean` | `getContextualBoolean(Message m, String key, boolean defaultValue)`
    `static int` | `getContextualInteger(Message m, String key, int defaultValue)`
    `static Object` | `getContextualProperty(Message m, String propPreferred, String propDefault)`
    `static FaultMode` | `getFaultMode(Message message)` Determine the fault mode for the underlying (fault) message (for use on server side only).
    `static boolean` | `isDOMPresent(Message m)` Returns true if the underlying content format is a W3C DOM or a SAAJ message.
    `static boolean` | `isEmptyPartialResponse(Message message)` Determines if the current message is an empty partial response, which is a partial response with an empty content.
    `static boolean` | `isFault(Message message)` Determine if message is fault.
    `static boolean` | `isOutbound(Message message)` Determine if message is outbound.
    `static boolean` | `isPartialResponse(Message message)` Determine if the current message is a partial response.
    `static boolean` | `isRequestor(Message message)` Determine if current messaging role is that of requestor.
    `static boolean` | `isTrue(Object value)` Deprecated.

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

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

- - ### Method Detail

    - #### isOutbound

          public static boolean isOutbound(Message message)

      Determine if message is outbound.
      Parameters:
        `message` - the current Message
      Returns:
        true if the message direction is outbound

    - #### isFault

          public static boolean isFault(Message message)

      Determine if message is fault.
      Parameters:
        `message` - the current Message
      Returns:
        true if the message is a fault

    - #### getFaultMode

          public static FaultMode getFaultMode(Message message)

      Determine the fault mode for the underlying (fault) message (for use on server side only).
      Parameters:
        `message` - the fault message
      Returns:
        the FaultMode

    - #### isRequestor

          public static boolean isRequestor(Message message)

      Determine if current messaging role is that of requestor.
      Parameters:
        `message` - the current Message
      Returns:
        true if the current messaging role is that of requestor

    - #### isPartialResponse

          public static boolean isPartialResponse(Message message)

      Determine if the current message is a partial response.
      Parameters:
        `message` - the current message
      Returns:
        true if the current messags is a partial response

    - #### isEmptyPartialResponse

          public static boolean isEmptyPartialResponse(Message message)

      Determines if the current message is an empty partial response, which is a partial response with an empty content.
      Parameters:
        `message` - the current message
      Returns:
        true if the current messags is a partial empty response

    - #### isTrue

          @Deprecated
          public static boolean isTrue(Object value)

      Deprecated.
      Returns true if a value is either the String "true" (regardless of case) or Boolean.TRUE.
      Parameters:
        `value` -
      Returns:
        true if value is either the String "true" or Boolean.TRUE

    - #### getContextualBoolean

          public static boolean getContextualBoolean(Message m,
                                                     String key)

    - #### getContextualBoolean

          public static boolean getContextualBoolean(Message m,
                                                     String key,
                                                     boolean defaultValue)

    - #### getContextualInteger

          public static int getContextualInteger(Message m,
                                                 String key,
                                                 int defaultValue)

    - #### getContextualProperty

          public static Object getContextualProperty(Message m,
                                                     String propPreferred,
                                                     String propDefault)

    - #### isDOMPresent

          public static boolean isDOMPresent(Message m)

      Returns true if the underlying content format is a W3C DOM or a SAAJ message.

Apache CXF