Package com.iplanet.services.ldap.event
Class EventService
- java.lang.Object
-
- com.iplanet.services.ldap.event.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 Summary
Fields Modifier and Type Field Description static intRETRY_INTERVALRetry interval for reconnecting to persistent searches.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EventServicegetEventService()Returns the event service (presuming we are not in the process of shutting down).IDSEventListenergetListener(Class<? extends IDSEventListener> listenerClass)Retrieve the listener of a specific listening class derivative type.static booleanisStarted()Informs the callers as to the state of the EventService.voidrestartPSearches()Restarts all currently registered persistent searches.voidstopPSearches()Removes listeners from running persistent searches and then stops their execution on the datastore.
-
-
-
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:
EventExceptionorg.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:
trueif 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- TheIDSEventListenerimplementation class to retrieve.- Returns:
- a listener of the class type provided.
-
-