public class ObservationManagerImpl extends Object implements org.apache.jackrabbit.api.observation.JackrabbitObservationManager
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Marker |
OBSERVATION |
Constructor and Description |
---|
ObservationManagerImpl(SessionContext sessionContext,
org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager nodeTypeManager,
org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard whiteboard,
int queueLength,
org.apache.jackrabbit.oak.plugins.observation.CommitRateLimiter commitRateLimiter)
Create a new instance based on a
ContentSession that needs to implement
Observable . |
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(javax.jcr.observation.EventListener listener,
org.apache.jackrabbit.oak.plugins.observation.filter.FilterProvider filterProvider)
Adds an event listener that listens for the events specified
by the
filterProvider passed to this method. |
void |
addEventListener(javax.jcr.observation.EventListener listener,
int eventTypes,
String absPath,
boolean isDeep,
String[] uuids,
String[] nodeTypeName,
boolean noLocal) |
void |
addEventListener(javax.jcr.observation.EventListener listener,
org.apache.jackrabbit.api.observation.JackrabbitEventFilter filter) |
void |
dispose() |
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 |
removeEventListener(javax.jcr.observation.EventListener listener) |
void |
setUserData(@Nullable String userData) |
public ObservationManagerImpl(SessionContext sessionContext, org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager nodeTypeManager, org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard whiteboard, int queueLength, org.apache.jackrabbit.oak.plugins.observation.CommitRateLimiter commitRateLimiter)
ContentSession
that needs to implement
Observable
.sessionContext
- session delegate of the session in whose context this observation manager
operates.nodeTypeManager
- node type manager for the content sessionwhiteboard
- IllegalArgumentException
- if contentSession
doesn't implement Observable
.public void dispose()
public void addEventListener(javax.jcr.observation.EventListener listener, org.apache.jackrabbit.oak.plugins.observation.filter.FilterProvider filterProvider)
filterProvider
passed to this method.
The set of events will be further filtered by the access rights
of the current Session
.
The filters of an already-registered EventListener
can be
changed at runtime by re-registering the same EventListener
object (i.e. the same actual Java object) with a new filter provider.
The implementation must ensure that no events are lost during the
changeover.
listener
- an EventListener
object.filterProvider
- filter provider specifying the filter for this listenerpublic void addEventListener(javax.jcr.observation.EventListener listener, int eventTypes, String absPath, boolean isDeep, String[] uuids, String[] nodeTypeName, boolean noLocal) throws javax.jcr.RepositoryException
addEventListener
in interface javax.jcr.observation.ObservationManager
javax.jcr.RepositoryException
public 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.JackrabbitObservationManager
javax.jcr.RepositoryException
public void removeEventListener(javax.jcr.observation.EventListener listener)
removeEventListener
in interface javax.jcr.observation.ObservationManager
public javax.jcr.observation.EventListenerIterator getRegisteredEventListeners()
getRegisteredEventListeners
in interface javax.jcr.observation.ObservationManager
public void setUserData(@Nullable @Nullable String userData)
setUserData
in interface javax.jcr.observation.ObservationManager
public javax.jcr.observation.EventJournal getEventJournal() throws javax.jcr.RepositoryException
getEventJournal
in interface javax.jcr.observation.ObservationManager
javax.jcr.RepositoryException
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
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.