-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumMedia.StatusDefines possible media statuses.
public interfaceMedia.MediaEventpublic final classMedia.EventsDefines media event types.
-
Method Summary
Modifier and Type Method Description abstract <T> voidon(Media.MediaEvent<T> event, Consumer<T> listener)Registers event listeners for Media. abstract <T> voidoff(Media.MediaEvent<T> event, Consumer<T> listener)Removes event listeners from Media. abstract <T> voidoff(Media.MediaEvent<T> event)Removes all event listeners from Media. -
-
Method Detail
-
on
abstract <T> void on(Media.MediaEvent<T> event, Consumer<T> listener)
Registers event listeners for Media.
If a listener is added while the event is being processing,it is not triggered with the current event.
If multiple identical listeners are registered on the same event typethe duplicate instances are discarded. They do not cause the listenerto be called twice and do not need to be removed with the off or off method.
- Parameters:
event- One of Eventslistener- Event listener to register
-
off
abstract <T> void off(Media.MediaEvent<T> event, Consumer<T> listener)
Removes event listeners from Media.
If a listener is removed while the event is being processing,it is not triggered with the current event.
Calling
{@code off}with arguments which do not identify any currently registeredlistener has no effect.- Parameters:
event- One of Eventslistener- Event listener to remove
-
-
-
-