Interface EventSubscriber<T>

  • All Known Subinterfaces:
    EventSubscriber<E>

    public interface EventSubscriber<T>
    Callback interface for class-based subscribers of an EventService.
    Author:
    Michael Bushe michael@bushe.com
    • Method Detail

      • onEvent

        void onEvent​(T event)
        Handle a published event.

        The EventService calls this method on each publication of an object that matches the class or interface passed to one of the EventService's class-based subscribe methods, specifically, EventService.subscribe(Class,EventSubscriber) EventService.subscribeExactly(Class,EventSubscriber) EventService.subscribeStrongly(Class,EventSubscriber) and EventService.subscribeExactlyStrongly(Class, EventSubscriber).

        Parameters:
        event - The Object that is being published.