Class ObservationManagerImpl
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.observation.ObservationManagerImpl
-
- All Implemented Interfaces:
ObservationManager,InternalEventListener
public class ObservationManagerImpl extends Object implements ObservationManager, InternalEventListener
ObservationManagerImpl...
-
-
Constructor Summary
Constructors Constructor Description ObservationManagerImpl(WorkspaceManager wspManager, NamePathResolver resolver, NodeTypeRegistry ntRegistry)Creates a new observation manager forsession.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEventListener(EventListener listener, int eventTypes, String absPath, boolean isDeep, String[] uuids, String[] nodeTypeNames, boolean noLocal)Collection<EventFilter>getEventFilters()Returns a collection of event filters which is in use by this event listener.EventJournalgetEventJournal()EventJournalgetEventJournal(int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName)EventListenerIteratorgetRegisteredEventListeners()voidonEvent(EventBundle eventBundle)Gets called when an event occurs.voidremoveEventListener(EventListener listener)voidsetUserData(String userData)
-
-
-
Constructor Detail
-
ObservationManagerImpl
public ObservationManagerImpl(WorkspaceManager wspManager, NamePathResolver resolver, NodeTypeRegistry ntRegistry)
Creates a new observation manager forsession.- Parameters:
wspManager- the WorkspaceManager.resolver- the name path resolver for this session.ntRegistry- TheNodeTypeRegistryof the session.
-
-
Method Detail
-
addEventListener
public void addEventListener(EventListener listener, int eventTypes, String absPath, boolean isDeep, String[] uuids, String[] nodeTypeNames, boolean noLocal) throws RepositoryException
- Specified by:
addEventListenerin interfaceObservationManager- Throws:
RepositoryException
-
removeEventListener
public void removeEventListener(EventListener listener) throws RepositoryException
- Specified by:
removeEventListenerin interfaceObservationManager- Throws:
RepositoryException
-
getRegisteredEventListeners
public EventListenerIterator getRegisteredEventListeners() throws RepositoryException
- Specified by:
getRegisteredEventListenersin interfaceObservationManager- Throws:
RepositoryException
-
getEventJournal
public EventJournal getEventJournal() throws RepositoryException
- Specified by:
getEventJournalin interfaceObservationManager- Throws:
RepositoryException- See Also:
ObservationManager.getEventJournal()
-
getEventJournal
public EventJournal getEventJournal(int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName) throws RepositoryException
- Specified by:
getEventJournalin interfaceObservationManager- Throws:
RepositoryException- See Also:
ObservationManager.getEventJournal(int, String, boolean, String[], String[])
-
setUserData
public void setUserData(String userData) throws RepositoryException
- Specified by:
setUserDatain interfaceObservationManager- Throws:
RepositoryException- See Also:
ObservationManager.setUserData(String)
-
getEventFilters
public Collection<EventFilter> getEventFilters()
Description copied from interface:InternalEventListenerReturns a collection of event filters which is in use by this event listener. The event bundles delivered toInternalEventListener.onEvent(org.apache.jackrabbit.spi.EventBundle)will be filtered using the collection returned by this method. An event is included in an event bundles if it is accepted by at least one of the filters returned by this method.- Specified by:
getEventFiltersin interfaceInternalEventListener- Returns:
- an unmodifiable collection of
EventFilters currently in use by this event listener.
-
onEvent
public void onEvent(EventBundle eventBundle)
Description copied from interface:InternalEventListenerGets called when an event occurs.- Specified by:
onEventin interfaceInternalEventListener- Parameters:
eventBundle- the event set received.
-
-