Interface EventListener<E extends Event>

  • All Superinterfaces:
    ServiceConsumer

    public interface EventListener<E extends Event>
    extends ServiceConsumer
    This class resolve the interface to receive events of the instance.
    Author:
    javaito
    • Method Summary

      Modifier and Type Method Description
      default java.lang.Class<E> getEventType()
      Return the implementation type of the event listener.
      void onEventReceived​(E event)
      When a event is received.
    • Method Detail

      • onEventReceived

        void onEventReceived​(E event)
        When a event is received.
        Parameters:
        event - Received event.
      • getEventType

        default java.lang.Class<E> getEventType()
        Return the implementation type of the event listener.
        Returns:
        Implementation type.