Package org.refcodes.checkerboard
Interface PlayerObserver<P extends Player<P,S>,S>
-
- Type Parameters:
P
- the generic typeS
- the generic type
- All Superinterfaces:
ChangePositionObserver<P>
,ClickedObserver<P>
,DraggabilityChangedObserver<P>
,PositionChangedObserver<P>
,StateChangedObserver<P,S>
,VisibilityChangedObserver<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 ClickedObserver<P>, ChangePositionObserver<P>, PositionChangedObserver<P>, StateChangedObserver<P,S>, VisibilityChangedObserver<P>, DraggabilityChangedObserver<P>
An asynchronous update interface for receiving notifications about Player information as the Player is constructed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
onChangePositionEvent(ChangePositionEvent<P> aPlayerEvent)
This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.default void
onClickedEvent(ClickedEvent<P> aPlayerEvent)
This method is called when a player has been clicked.default void
onDraggabilityChangedEvent(DraggabilityChangedEvent<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
onPositionChangedEvent(PositionChangedEvent<P> aPlayerEvent)
This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.default void
onStateChangedEvent(StateChangedEvent<P,S> aPlayerEvent)
This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.default void
onVisibilityChangedEvent(VisibilityChangedEvent<P> aPlayerEvent)
This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.
-
-
-
Method Detail
-
onPlayerEvent
void onPlayerEvent(PlayerEvent<P> aPlayerEvent)
This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.- Parameters:
aPlayerEvent
- the player event
-
onChangePositionEvent
default void onChangePositionEvent(ChangePositionEvent<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:
onChangePositionEvent
in interfaceChangePositionObserver<P extends Player<P,S>>
- Parameters:
aPlayerEvent
- the player event- Throws:
org.refcodes.exception.VetoException
- the veto exception
-
onPositionChangedEvent
default void onPositionChangedEvent(PositionChangedEvent<P> aPlayerEvent)
This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.- Specified by:
onPositionChangedEvent
in interfacePositionChangedObserver<P extends Player<P,S>>
- Parameters:
aPlayerEvent
- the player event
-
onStateChangedEvent
default void onStateChangedEvent(StateChangedEvent<P,S> aPlayerEvent)
This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.- Specified by:
onStateChangedEvent
in interfaceStateChangedObserver<P extends Player<P,S>,S>
- Parameters:
aPlayerEvent
- the player event
-
onVisibilityChangedEvent
default void onVisibilityChangedEvent(VisibilityChangedEvent<P> aPlayerEvent)
This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.- Specified by:
onVisibilityChangedEvent
in interfaceVisibilityChangedObserver<P extends Player<P,S>>
- Parameters:
aPlayerEvent
- the player event
-
onDraggabilityChangedEvent
default void onDraggabilityChangedEvent(DraggabilityChangedEvent<P> aPlayerEvent)
This method is called when information about an Player which was previously requested using an asynchronous interface becomes available.- Specified by:
onDraggabilityChangedEvent
in interfaceDraggabilityChangedObserver<P extends Player<P,S>>
- Parameters:
aPlayerEvent
- the player event
-
onClickedEvent
default void onClickedEvent(ClickedEvent<P> aPlayerEvent)
This method is called when a player has been clicked.- Specified by:
onClickedEvent
in interfaceClickedObserver<P extends Player<P,S>>
- Parameters:
aPlayerEvent
- the player event
-
-