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 aPlayerMessage.Target
which has access to the player when handling messages. Can be used withActionSchedule.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)
-
-
-
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 interfacePlayerMessage.Target
- Parameters:
messageType
- The message type.message
- The message payload.
-
-