Package com.castlabs.android.player.models.mpd

# Class EventMessage

java.lang.Object
com.castlabs.android.player.models.mpd.EventMessage

All Implemented Interfaces:
  `Parcelable`

public final class EventMessage extends Object implements Parcelable
An Event Message (emsg) as defined in ISO 23009-1.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `EventMessage.Builder`
  Builder for creating EventMessage instances.

  ## Nested classes/interfaces inherited from interface android.os.Parcelable

  `Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Parcelable.Creator<EventMessage>`
  `CREATOR`
  Creator for Parcelable implementation.

  ### Fields inherited from interface android.os.Parcelable

  `CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EventMessage(String schemeIdUri, String value, long durationMs, long id, byte[] messageData)`
  Creates a new EventMessage.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `describeContents()`
  `boolean`
  `equals(Object obj)`
  `long`
  `getDurationMs()`
  Gets the duration of the event in milliseconds.
  `long`
  `getId()`
  Gets the instance identifier.
  `byte[]`
  `getMessageData()`
  Gets the body of the message.
  `String`
  `getSchemeIdUri()`
  Gets the message scheme.
  `String`
  `getValue()`
  Gets the value for the event.
  `int`
  `hashCode()`
  `String`
  `toString()`
  `void`
  `writeToParcel(Parcel dest, int flags)`

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

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

- ## Field Details

  - ### CREATOR

    public static final Parcelable.Creator<EventMessage> CREATOR
    Creator for Parcelable implementation.

- ## Constructor Details

  - ### EventMessage

    public EventMessage(@NonNull String schemeIdUri, @NonNull String value, long durationMs, long id, @Nullable byte[] messageData)
    Creates a new EventMessage.
    Parameters:
      `schemeIdUri` - The message scheme.
      `value` - The value for the event.
      `durationMs` - The duration of the event in milliseconds.
      `id` - The instance identifier.
      `messageData` - The body of the message.

- ## Method Details

  - ### getSchemeIdUri

    @NonNull public String getSchemeIdUri()
    Gets the message scheme.
    Returns:
      The message scheme.

  - ### getValue

    @NonNull public String getValue()
    Gets the value for the event.
    Returns:
      The value for the event.

  - ### getDurationMs

    public long getDurationMs()
    Gets the duration of the event in milliseconds.
    Returns:
      The duration of the event in milliseconds.

  - ### getId

    public long getId()
    Gets the instance identifier.
    Returns:
      The instance identifier.

  - ### getMessageData

    @Nullable public byte[] getMessageData()
    Gets the body of the message.
    Returns:
      The body of the message.

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(@Nullable Object obj)
    Overrides:
      `equals` in class `Object`

  - ### toString

    @NonNull public String toString()
    Overrides:
      `toString` in class `Object`

  - ### describeContents

    public int describeContents()
    Specified by:
      `describeContents` in interface `Parcelable`

  - ### writeToParcel

    public void writeToParcel(@NonNull Parcel dest, int flags)
    Specified by:
      `writeToParcel` in interface `Parcelable`