public class ObservationManagerImpl extends Object implements javax.jcr.observation.ObservationManager, InternalEventListener
ObservationManagerImpl
...Constructor and Description |
---|
ObservationManagerImpl(WorkspaceManager wspManager,
NamePathResolver resolver,
NodeTypeRegistry ntRegistry)
Creates a new observation manager for
session . |
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(javax.jcr.observation.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.
|
javax.jcr.observation.EventJournal |
getEventJournal() |
javax.jcr.observation.EventJournal |
getEventJournal(int eventTypes,
String absPath,
boolean isDeep,
String[] uuid,
String[] nodeTypeName) |
javax.jcr.observation.EventListenerIterator |
getRegisteredEventListeners() |
void |
onEvent(EventBundle eventBundle)
Gets called when an event occurs.
|
void |
removeEventListener(javax.jcr.observation.EventListener listener) |
void |
setUserData(String userData) |
public ObservationManagerImpl(WorkspaceManager wspManager, NamePathResolver resolver, NodeTypeRegistry ntRegistry)
session
.wspManager
- the WorkspaceManager.resolver
- the name path resolver for this session.ntRegistry
- The NodeTypeRegistry
of the session.public void addEventListener(javax.jcr.observation.EventListener listener, int eventTypes, String absPath, boolean isDeep, String[] uuids, String[] nodeTypeNames, boolean noLocal) throws javax.jcr.RepositoryException
addEventListener
in interface javax.jcr.observation.ObservationManager
javax.jcr.RepositoryException
public void removeEventListener(javax.jcr.observation.EventListener listener) throws javax.jcr.RepositoryException
removeEventListener
in interface javax.jcr.observation.ObservationManager
javax.jcr.RepositoryException
public javax.jcr.observation.EventListenerIterator getRegisteredEventListeners() throws javax.jcr.RepositoryException
getRegisteredEventListeners
in interface javax.jcr.observation.ObservationManager
javax.jcr.RepositoryException
public javax.jcr.observation.EventJournal getEventJournal() throws javax.jcr.RepositoryException
getEventJournal
in interface javax.jcr.observation.ObservationManager
javax.jcr.RepositoryException
ObservationManager.getEventJournal()
public javax.jcr.observation.EventJournal getEventJournal(int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName) throws javax.jcr.RepositoryException
getEventJournal
in interface javax.jcr.observation.ObservationManager
javax.jcr.RepositoryException
ObservationManager.getEventJournal(int, String, boolean, String[], String[])
public void setUserData(String userData) throws javax.jcr.RepositoryException
setUserData
in interface javax.jcr.observation.ObservationManager
javax.jcr.RepositoryException
ObservationManager.setUserData(String)
public Collection<EventFilter> getEventFilters()
InternalEventListener
InternalEventListener.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.getEventFilters
in interface InternalEventListener
EventFilter
s currently
in use by this event listener.public void onEvent(EventBundle eventBundle)
InternalEventListener
onEvent
in interface InternalEventListener
eventBundle
- the event set received.Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.