Package 

Interface Media


  • 
    public interface Media
    
                        

    Interface for managing different media during Engagement.

    To get instance of this class use getMedia

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public enum Media.Status

      Defines possible media statuses.

      public interface Media.MediaEvent
      public final class Media.Events

      Defines media event types.

    • Method Summary

      Modifier and Type Method Description
      abstract <T> void on(Media.MediaEvent<T> event, Consumer<T> listener) Registers event listeners for Media.
      abstract <T> void off(Media.MediaEvent<T> event, Consumer<T> listener) Removes event listeners from Media.
      abstract <T> void off(Media.MediaEvent<T> event) Removes all event listeners from Media.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 Events
        listener - 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 Events
        listener - Event listener to remove
      • off

         abstract <T> void off(Media.MediaEvent<T> event)

        Removes all event listeners from Media.

        Behaves the same way as off but removes all listeners of specified type

        Parameters:
        event - One of Events