Package com.google.android.exoplayer2.testutil

## Class ActionSchedule.PlayerTarget

- java.lang.Object
- - com.google.android.exoplayer2.testutil.ActionSchedule.PlayerTarget

- All Implemented Interfaces:
    `PlayerMessage.Target`
  Enclosing class:
    ActionSchedule

      public abstract static class ActionSchedule.PlayerTarget
      extends Object
      implements PlayerMessage.Target

  Provides a wrapper for a `PlayerMessage.Target` which has access to the player when handling messages. Can be used with `ActionSchedule.Builder.sendMessage(Target, long)`.

  The target can be passed to `ActionSchedule.Builder.waitForMessage(PlayerTarget)` to wait for a message to arrive at the target.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static interface` | `ActionSchedule.PlayerTarget.Callback` | Callback to be called when message arrives.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PlayerTarget()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `handleMessage​(@com.google.android.exoplayer2.Renderer.MessageType int messageType, Object message)` | Handles a message delivered to the target.
    `abstract void` | `handleMessage​(ExoPlayer player, int messageType, Object message)` | Handles the message send to the component and additionally provides access to the player.
    `void` | `setCallback​(ActionSchedule.PlayerTarget.Callback callback)` |

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

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

- - ### Constructor Detail

    - #### PlayerTarget

          public PlayerTarget()

  - ### Method Detail

    - #### setCallback

          public void setCallback​(ActionSchedule.PlayerTarget.Callback callback)

    - #### handleMessage

          public abstract void handleMessage​(ExoPlayer player,
                                             int messageType,
                                             @Nullable
                                             Object message)

      Handles the message send to the component and additionally provides access to the player.

    - #### handleMessage

          public final void handleMessage​(@com.google.android.exoplayer2.Renderer.MessageType int messageType,
                                          @Nullable
                                          Object message)

      Description copied from interface: `PlayerMessage.Target`
      Handles a message delivered to the target.
      Specified by:
        `handleMessage` in interface `PlayerMessage.Target`
      Parameters:
        `messageType` - The message type.
        `message` - The message payload.