Interface EventListener<E extends Event>

    • Method Detail

      • findEventType

        static java.lang.Class<? extends Event> findEventType​(java.lang.Class<?> listenerClass)
        Find the type event from the specified event listener
        Parameters:
        listenerClass - the class of event listener
        Returns:
        null if not found
      • findEventType

        static java.lang.Class<? extends Event> findEventType​(java.lang.reflect.ParameterizedType parameterizedType)
        Find the type event from the specified ParameterizedType presents a class of event listener
        Parameters:
        parameterizedType - the ParameterizedType presents a class of event listener
        Returns:
        null if not found
      • onEvent

        void onEvent​(E event)
        Handle a Event when it's be published
        Parameters:
        event - a Event