Interface EventListener

  • All Known Implementing Classes:
    EventListenerExample

    public interface EventListener
    These will be triggered when specific events occur in the system.
    Author:
    Aaron Zeckoski (azeckoski @ gmail.com)
    • Method Detail

      • getEventNamePrefixes

        String[] getEventNamePrefixes()
        This defines the events that you want to know about by event name. receiveEvent(Event) will be called whenever an event occurs which has a name that begins with any of the strings this method returns. Simply return an empty array if you do not want to match events this way.

        Note: Can be used with getResourcePrefix().

        Returns:
        an arrays of event name prefixes
      • getResourcePrefix

        String getResourcePrefix()
        This defines the events that you want to know about by event resource (reference). receiveEvent(Event) will be called whenever an event occurs which has a resource that begins with the string this method returns. Simply return an empty string to match no events this way.

        Note: Can be used with getEventNamePrefixes().

        Returns:
        a string with a resource (reference) prefix
      • receiveEvent

        void receiveEvent​(Event event)
        Called when an event occurs which passes through the filters created by getEventNamePrefixes() and getResourcePrefix().
        Parameters:
        event - includes all the information related to the event that occurred