Class EventService


  • public class EventService
    extends Object
    The EventService is responsible for listening to and dispatching to listening objects messages returning from persistent searches running in an underlying LDAP implementation.
    • Field Detail

      • RETRY_INTERVAL

        public static final int RETRY_INTERVAL
        Retry interval for reconnecting to persistent searches.
    • Method Detail

      • getEventService

        public static EventService getEventService()
                                            throws EventException,
                                                   org.forgerock.opendj.ldap.LdapException
        Returns the event service (presuming we are not in the process of shutting down).
        Returns:
        The singleton instance of the EventService.
        Throws:
        EventException
        org.forgerock.opendj.ldap.LdapException
      • restartPSearches

        public void restartPSearches()
        Restarts all currently registered persistent searches. Persistent searches that do not have enabled listeners are removed. Legacy Comment: Question: is ok to not actually restart running psearches if the listener is still enabled?
      • stopPSearches

        public void stopPSearches()
        Removes listeners from running persistent searches and then stops their execution on the datastore.
      • isStarted

        public static boolean isStarted()
        Informs the callers as to the state of the EventService.
        Returns:
        true if the EventService is started and the system is not shutting down.
      • getListener

        public IDSEventListener getListener​(Class<? extends IDSEventListener> listenerClass)
        Retrieve the listener of a specific listening class derivative type.
        Parameters:
        listenerClass - The IDSEventListener implementation class to retrieve.
        Returns:
        a listener of the class type provided.