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 void
addEventListener(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.EventJournal
getEventJournal()
EventJournal
getEventJournal(int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName)
EventListenerIterator
getRegisteredEventListeners()
void
onEvent(EventBundle eventBundle)
Gets called when an event occurs.void
removeEventListener(EventListener listener)
void
setUserData(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
- TheNodeTypeRegistry
of 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:
addEventListener
in interfaceObservationManager
- Throws:
RepositoryException
-
removeEventListener
public void removeEventListener(EventListener listener) throws RepositoryException
- Specified by:
removeEventListener
in interfaceObservationManager
- Throws:
RepositoryException
-
getRegisteredEventListeners
public EventListenerIterator getRegisteredEventListeners() throws RepositoryException
- Specified by:
getRegisteredEventListeners
in interfaceObservationManager
- Throws:
RepositoryException
-
getEventJournal
public EventJournal getEventJournal() throws RepositoryException
- Specified by:
getEventJournal
in 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:
getEventJournal
in interfaceObservationManager
- Throws:
RepositoryException
- See Also:
ObservationManager.getEventJournal(int, String, boolean, String[], String[])
-
setUserData
public void setUserData(String userData) throws RepositoryException
- Specified by:
setUserData
in interfaceObservationManager
- Throws:
RepositoryException
- See Also:
ObservationManager.setUserData(String)
-
getEventFilters
public Collection<EventFilter> getEventFilters()
Description copied from interface:InternalEventListener
Returns 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:
getEventFilters
in interfaceInternalEventListener
- Returns:
- an unmodifiable collection of
EventFilter
s currently in use by this event listener.
-
onEvent
public void onEvent(EventBundle eventBundle)
Description copied from interface:InternalEventListener
Gets called when an event occurs.- Specified by:
onEvent
in interfaceInternalEventListener
- Parameters:
eventBundle
- the event set received.
-
-