public class ObservationManagerImpl extends Object implements EventStateCollectionFactory, org.apache.jackrabbit.api.observation.JackrabbitObservationManager
Session instance has its own ObservationManager
instance. The class SessionLocalObservationManager implements
this behaviour.| Constructor and Description |
|---|
ObservationManagerImpl(ObservationDispatcher dispatcher,
SessionImpl session,
ClusterNode clusterNode)
Creates an
ObservationManager instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(javax.jcr.observation.EventListener listener,
int eventTypes,
String absPath,
boolean isDeep,
String[] uuid,
String[] nodeTypeName,
boolean noLocal) |
void |
addEventListener(javax.jcr.observation.EventListener listener,
org.apache.jackrabbit.api.observation.JackrabbitEventFilter filter) |
EventFilter |
createEventFilter(int eventTypes,
List<String> absPaths,
boolean isDeep,
String[] uuid,
String[] nodeTypeName,
boolean noLocal,
boolean noExternal,
boolean noInternal)
Creates a new event filter with the given restrictions.
|
EventStateCollection |
createEventStateCollection()
Creates an
EventStateCollection. |
void |
dispose()
Unregisters all EventListeners.
|
javax.jcr.observation.EventJournal |
getEventJournal()
Returns an unfiltered event journal for this workspace.
|
javax.jcr.observation.EventJournal |
getEventJournal(int eventTypes,
String absPath,
boolean isDeep,
String[] uuid,
String[] nodeTypeName)
Returns the event journal for this workspace.
|
javax.jcr.observation.EventListenerIterator |
getRegisteredEventListeners() |
void |
removeEventListener(javax.jcr.observation.EventListener listener) |
void |
setUserData(String userData) |
public ObservationManagerImpl(ObservationDispatcher dispatcher, SessionImpl session, ClusterNode clusterNode)
ObservationManager instance.dispatcher - observation dispatchersession - the Session this ObservationManager
belongs to.clusterNode - NullPointerException - if dispatcher, session
or clusterNode is null.public void addEventListener(javax.jcr.observation.EventListener listener,
int eventTypes,
String absPath,
boolean isDeep,
String[] uuid,
String[] nodeTypeName,
boolean noLocal)
throws javax.jcr.RepositoryException
addEventListener in interface javax.jcr.observation.ObservationManagerjavax.jcr.RepositoryExceptionpublic void addEventListener(javax.jcr.observation.EventListener listener,
org.apache.jackrabbit.api.observation.JackrabbitEventFilter filter)
throws javax.jcr.RepositoryException
addEventListener in interface org.apache.jackrabbit.api.observation.JackrabbitObservationManagerjavax.jcr.RepositoryExceptionpublic void removeEventListener(javax.jcr.observation.EventListener listener)
throws javax.jcr.RepositoryException
removeEventListener in interface javax.jcr.observation.ObservationManagerjavax.jcr.RepositoryExceptionpublic javax.jcr.observation.EventListenerIterator getRegisteredEventListeners()
throws javax.jcr.RepositoryException
getRegisteredEventListeners in interface javax.jcr.observation.ObservationManagerjavax.jcr.RepositoryExceptionpublic void setUserData(String userData) throws javax.jcr.RepositoryException
setUserData in interface javax.jcr.observation.ObservationManagerjavax.jcr.RepositoryExceptionpublic void dispose()
public EventFilter createEventFilter(int eventTypes, List<String> absPaths, boolean isDeep, String[] uuid, String[] nodeTypeName, boolean noLocal, boolean noExternal, boolean noInternal) throws javax.jcr.RepositoryException
eventTypes - A combination of one or more event type constants encoded as a bitmask.absPaths - absolute paths.isDeep - a boolean.uuid - array of UUIDs.nodeTypeName - array of node type names.noLocal - a boolean.noExternal - a boolean.noInternal - a boolean.javax.jcr.RepositoryException - if an error occurs.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.ObservationManagereventTypes - A combination of one or more event type constants encoded as a bitmask.absPath - an absolute path.isDeep - a boolean.uuid - array of UUIDs.nodeTypeName - array of node type names.javax.jcr.UnsupportedRepositoryOperationException - if this repository does
not support an event journal (cluster journal disabled).javax.jcr.RepositoryException - if another error occurs.ObservationManager.getEventJournal(int, String, boolean, String[], String[])public javax.jcr.observation.EventJournal getEventJournal()
throws javax.jcr.RepositoryException
getEventJournal in interface javax.jcr.observation.ObservationManagerjavax.jcr.UnsupportedRepositoryOperationException - if this repository does
not support an event journal (cluster journal disabled).javax.jcr.RepositoryException - if another error occurs.public EventStateCollection createEventStateCollection()
EventStateCollection.
Creates an EventStateCollection tied to the session
which is attached to this ObservationManager instance.
createEventStateCollection in interface EventStateCollectionFactoryEventStateCollectionCopyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.