Interface EventReceiver


  • public interface EventReceiver
    Allows a developer to create a method which will be called when specific events occur by implementing this interface, this uses the Sakai event services
    Author:
    Aaron Zeckoski (aaronz@vt.edu), Antranig Basman (antranig@caret.cam.ac.uk)
    • Method Detail

      • getEventNamePrefixes

        String[] getEventNamePrefixes()
        This defines the events that you want to know about by event name, receiveEvent(String, String) will be called whenever an event occurs which has a name which begins with any of the strings this method returns, simply return 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(String, String) will be called whenever an event occurs which has a resource which begins with the string this method returns, simply return 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​(String eventName,
                          String id)
        This defines what should happen when an event occurs that you want to know about
        Parameters:
        eventName - a string which represents the name of the event (e.g. announcement.create)
        id - the local id of the entity