com.samsung.multiscreen

## Class Message

- java.lang.Object
- - com.samsung.multiscreen.Message

-     public class Message
      extends Object

  Contains message data when communicating with MultiScreen-enabled devices. If the client is subscribed to a `Channel` and has added a `Channel.OnMessageListener` via `Channel.addOnMessageListener(String, Channel.OnMessageListener)`, then this client will be notified when the host or other clients publish messages to the specified event channel.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `PROPERTY_MESSAGE_ID`
    `static String` | `TARGET_ALL`
    `static String` | `TARGET_BROADCAST`
    `static String` | `TARGET_HOST`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `Channel` | `getChannel()` Returns the channel that this message is associated with.
    `Object` | `getData()` The data for this message.
    `String` | `getEvent()` Returns the channel event for this message.
    `Client` | `getFrom()` The originating client for this message.
    `byte[]` | `getPayload()` The binary payload for this message.
    `int` | `hashCode()`
    `String` | `toString()`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### TARGET_BROADCAST

          public static final String TARGET_BROADCAST

      See Also:
        Constant Field Values

    - #### TARGET_ALL

          public static final String TARGET_ALL

      See Also:
        Constant Field Values

    - #### TARGET_HOST

          public static final String TARGET_HOST

      See Also:
        Constant Field Values

    - #### PROPERTY_MESSAGE_ID

          public static final String PROPERTY_MESSAGE_ID

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getChannel

          @NonNull
          public Channel getChannel()

      Returns the channel that this message is associated with.
      Returns:
        the channel

    - #### getEvent

          @NonNull
          public String getEvent()

      Returns the channel event for this message.
      Returns:
        the channel event

    - #### getData

          public Object getData()

      The data for this message.
      Returns:
        the data

    - #### getFrom

          @NonNull
          public Client getFrom()

      The originating client for this message.
      Returns:
        the source client

    - #### getPayload

          public byte[] getPayload()

      The binary payload for this message. May be null.
      Returns:
        the binary payload, if any

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`