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(EventListener listener,
int eventTypes,
String absPath,
boolean isDeep,
String[] uuid,
String[] nodeTypeName,
boolean noLocal) |
void |
addEventListener(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.
|
EventJournal |
getEventJournal()
Returns an unfiltered event journal for this workspace.
|
EventJournal |
getEventJournal(int eventTypes,
String absPath,
boolean isDeep,
String[] uuid,
String[] nodeTypeName)
Returns the event journal for this workspace.
|
EventListenerIterator |
getRegisteredEventListeners() |
void |
removeEventListener(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(EventListener listener, int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName, boolean noLocal) throws RepositoryException
addEventListener
in interface ObservationManager
RepositoryException
public void addEventListener(EventListener listener, org.apache.jackrabbit.api.observation.JackrabbitEventFilter filter) throws RepositoryException
addEventListener
in interface org.apache.jackrabbit.api.observation.JackrabbitObservationManager
RepositoryException
public void removeEventListener(EventListener listener) throws RepositoryException
removeEventListener
in interface ObservationManager
RepositoryException
public EventListenerIterator getRegisteredEventListeners() throws RepositoryException
getRegisteredEventListeners
in interface ObservationManager
RepositoryException
public void setUserData(String userData) throws RepositoryException
setUserData
in interface ObservationManager
RepositoryException
public void dispose()
public EventFilter createEventFilter(int eventTypes, List<String> absPaths, boolean isDeep, String[] uuid, String[] nodeTypeName, boolean noLocal, boolean noExternal, boolean noInternal) throws 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
.RepositoryException
- if an error occurs.public EventJournal getEventJournal(int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName) throws RepositoryException
getEventJournal
in interface ObservationManager
eventTypes
- 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.UnsupportedRepositoryOperationException
- if this repository does
not support an event journal (cluster journal disabled).RepositoryException
- if another error occurs.ObservationManager.getEventJournal(int, String, boolean, String[], String[])
public EventJournal getEventJournal() throws RepositoryException
getEventJournal
in interface ObservationManager
UnsupportedRepositoryOperationException
- if this repository does
not support an event journal (cluster journal disabled).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 EventStateCollectionFactory
EventStateCollection
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.