Module org.refcodes.checkerboard
Package org.refcodes.checkerboard
Interface PlayerObserver<P extends Player<P,S>,S>
- Type Parameters:
P
- the generic typeS
- the generic type
- All Superinterfaces:
ChangePlayerPositionObserver<P>
,PlayerClickedObserver<P>
,PlayerDraggabilityChangedObserver<P>
,PlayerPositionChangedObserver<P>
,PlayerStateChangedObserver<P,
,S> PlayerVisibilityChangedObserver<P>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface PlayerObserver<P extends Player<P,S>,S>
extends PlayerClickedObserver<P>, ChangePlayerPositionObserver<P>, PlayerPositionChangedObserver<P>, PlayerStateChangedObserver<P,S>, PlayerVisibilityChangedObserver<P>, PlayerDraggabilityChangedObserver<P>
An asynchronous update interface for receiving notifications about Player
information as the Player is constructed.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
onChangePlayerPositionEvent
(ChangePlayerPositionEvent<P> aPlayerEvent) This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.default void
onPlayerClickedEvent
(PlayerClickedEvent<P> aPlayerEvent) This method is called when a player has been clicked.default void
onPlayerDraggabilityChangedEvent
(PlayerDraggabilityChangedEvent<P> aPlayerEvent) This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.void
onPlayerEvent
(PlayerEvent<P> aPlayerEvent) This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.default void
onPlayerPositionChangedEvent
(PlayerPositionChangedEvent<P> aPlayerEvent) This method is called when aPlayer
instance's position has changed.default void
onPlayerStateChangedEvent
(PlayerStateChangedEvent<P, S> aPlayerEvent) This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.default void
onPlayerVisibilityChangedEvent
(PlayerVisibilityChangedEvent<P> aPlayerEvent) This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.
-
Method Details
-
onPlayerEvent
This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.- Parameters:
aPlayerEvent
- the player event
-
onChangePlayerPositionEvent
default void onChangePlayerPositionEvent(ChangePlayerPositionEvent<P> aPlayerEvent) throws org.refcodes.exception.VetoException This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.- Specified by:
onChangePlayerPositionEvent
in interfaceChangePlayerPositionObserver<P extends Player<P,
S>> - Parameters:
aPlayerEvent
- the player event- Throws:
org.refcodes.exception.VetoException
- the veto exception
-
onPlayerPositionChangedEvent
This method is called when aPlayer
instance's position has changed.- Specified by:
onPlayerPositionChangedEvent
in interfacePlayerPositionChangedObserver<P extends Player<P,
S>> - Parameters:
aPlayerEvent
- thePlayerPositionChangedEvent
signaling the position change.
-
onPlayerStateChangedEvent
This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.- Specified by:
onPlayerStateChangedEvent
in interfacePlayerStateChangedObserver<P extends Player<P,
S>, S> - Parameters:
aPlayerEvent
- the player event
-
onPlayerVisibilityChangedEvent
This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.- Specified by:
onPlayerVisibilityChangedEvent
in interfacePlayerVisibilityChangedObserver<P extends Player<P,
S>> - Parameters:
aPlayerEvent
- the player event
-
onPlayerDraggabilityChangedEvent
This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.- Specified by:
onPlayerDraggabilityChangedEvent
in interfacePlayerDraggabilityChangedObserver<P extends Player<P,
S>> - Parameters:
aPlayerEvent
- the player event
-
onPlayerClickedEvent
This method is called when a player has been clicked.- Specified by:
onPlayerClickedEvent
in interfacePlayerClickedObserver<P extends Player<P,
S>> - Parameters:
aPlayerEvent
- the player event
-