org.wso2.carbon.device.mgt.mobile.windows.api.services.enrollment.util

## Class MessageHandler

- java.lang.Object
- - org.wso2.carbon.device.mgt.mobile.windows.api.services.enrollment.util.MessageHandler

- All Implemented Interfaces:
    Handler<SOAPMessageContext>, SOAPHandler<SOAPMessageContext>

      public class MessageHandler
      extends Object
      implements SOAPHandler<SOAPMessageContext>

  Class responsible for adding Timestamp security header in SOAP message and adding Content-length in the HTTP header for avoiding HTTP chunking.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `TIME_ZONE`
    `static int` | `TIMESTAMP_BEGIN_INDEX`
    `static int` | `TIMESTAMP_END_INDEX`
    `static int` | `VALIDITY_TIME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MessageHandler()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close(MessageContext context)`
    `Set<QName>` | `getHeaders()` This method resolves the security header coming in the SOAP message.
    `boolean` | `handleFault(SOAPMessageContext context)`
    `boolean` | `handleMessage(SOAPMessageContext context)` This method adds Timestamp for SOAP header, and adds Content-length for HTTP header for avoiding HTTP chunking.

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

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

- - ### Field Detail

    - #### TIME_ZONE

          public static final String TIME_ZONE

      See Also:
        Constant Field Values

    - #### VALIDITY_TIME

          public static final int VALIDITY_TIME

      See Also:
        Constant Field Values

    - #### TIMESTAMP_END_INDEX

          public static final int TIMESTAMP_END_INDEX

      See Also:
        Constant Field Values

    - #### TIMESTAMP_BEGIN_INDEX

          public static final int TIMESTAMP_BEGIN_INDEX

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MessageHandler

          public MessageHandler()

  - ### Method Detail

    - #### getHeaders

          public Set<QName> getHeaders()

      This method resolves the security header coming in the SOAP message.
      Specified by:
        `getHeaders` in interface `SOAPHandler<SOAPMessageContext>`
      Returns:
        - Security Header

    - #### handleMessage

          public boolean handleMessage(SOAPMessageContext context)

      This method adds Timestamp for SOAP header, and adds Content-length for HTTP header for avoiding HTTP chunking.
      Specified by:
        `handleMessage` in interface `Handler<SOAPMessageContext>`
      Parameters:
        `context` - - Context of the SOAP Message

    - #### handleFault

          public boolean handleFault(SOAPMessageContext context)

      Specified by:
        `handleFault` in interface `Handler<SOAPMessageContext>`

    - #### close

          public void close(MessageContext context)

      Specified by:
        `close` in interface `Handler<SOAPMessageContext>`

Copyright © 2017 WSO2. All rights reserved.