Package io.rong.message

## Class MessageHandler

- All Implemented Interfaces:

      public abstract class MessageHandler<T extends MessageContent>

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `public Context` | `context` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MessageHandler(Context context)` |

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `Context` | `getContext()` |
    `abstract void` | `decodeMessage(Message message, T content)` | 解码 MessageContent 到 Message 中。
    `abstract void` | `encodeMessage(Message message)` | 对 Message 编码。
    `void` | `setHandleMessageListener(IHandleMessageListener mHandleMessageListener)` | 此接口已经废弃不会参与实际代码逻辑

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

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

- - ### Constructor Detail

    - #### MessageHandler

          MessageHandler(Context context)

  - ### Method Detail

    - #### getContext

           Context getContext()

    - #### decodeMessage

           abstract void decodeMessage(Message message, T content)

      解码 MessageContent 到 Message 中。

      Parameters:
        `message` - 用于存放 MessageContent 的消息实体。
        `content` - 将要被解码的 MessageContent。

    - #### encodeMessage

           abstract void encodeMessage(Message message)

      对 Message 编码。

      Parameters:
        `message` - 将要被编码的 Message 实体。

    - #### setHandleMessageListener

          @Deprecated() void setHandleMessageListener(IHandleMessageListener mHandleMessageListener)

      此接口已经废弃不会参与实际代码逻辑