Class ObservationManagerImpl
- All Implemented Interfaces:
ObservationManager
,JackrabbitObservationManager
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionObservationManagerImpl
(SessionContext sessionContext, ReadOnlyNodeTypeManager nodeTypeManager, Whiteboard whiteboard, int queueLength, CommitRateLimiter commitRateLimiter) Create a new instance based on aContentSession
that needs to implementObservable
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEventListener
(EventListener listener, int eventTypes, String absPath, boolean isDeep, String[] uuids, String[] nodeTypeName, boolean noLocal) void
addEventListener
(EventListener listener, JackrabbitEventFilter filter) Adds an event listener that listens for the events specified by the passedJackrabbitEventFilter
.void
addEventListener
(EventListener listener, FilterProvider filterProvider) Adds an event listener that listens for the events specified by thefilterProvider
passed to this method.void
dispose()
getEventJournal
(int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName) void
removeEventListener
(EventListener listener) void
setUserData
(@Nullable String userData)
-
Field Details
-
OBSERVATION
-
-
Constructor Details
-
ObservationManagerImpl
public ObservationManagerImpl(SessionContext sessionContext, ReadOnlyNodeTypeManager nodeTypeManager, Whiteboard whiteboard, int queueLength, CommitRateLimiter commitRateLimiter) Create a new instance based on aContentSession
that needs to implementObservable
.- Parameters:
sessionContext
- session delegate of the session in whose context this observation manager operates.nodeTypeManager
- node type manager for the content sessionwhiteboard
-- Throws:
IllegalArgumentException
- ifcontentSession
doesn't implementObservable
.
-
-
Method Details
-
dispose
public void dispose() -
addEventListener
Adds an event listener that listens for the events specified by thefilterProvider
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 sameEventListener
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.- Parameters:
listener
- anEventListener
object.filterProvider
- filter provider specifying the filter for this listener
-
addEventListener
public void addEventListener(EventListener listener, int eventTypes, String absPath, boolean isDeep, String[] uuids, String[] nodeTypeName, boolean noLocal) throws RepositoryException - Specified by:
addEventListener
in interfaceObservationManager
- Throws:
RepositoryException
-
addEventListener
public void addEventListener(EventListener listener, JackrabbitEventFilter filter) throws RepositoryException Description copied from interface:JackrabbitObservationManager
Adds an event listener that listens for the events specified by the passedJackrabbitEventFilter
.In addition to the
EventFilter
, the set of events reported will be further filtered by the access rights of the currentSession
.See
JackrabbitEventFilter
for a description of the filtering parameters available.The filter of an already-registered
EventListener
can be changed at runtime by re-registering the sameEventListener
object (i.e. the same actual Java object) with a new filter. The implementation must ensure that no events are lost during the changeover.In addition to the filters placed on a listener above, the scope of observation support, in terms of which parts of a workspace are observable, may also be subject to implementation-specific restrictions. For example, in some repositories observation of changes in the
jcr:system
subgraph may not be supported.- Specified by:
addEventListener
in interfaceJackrabbitObservationManager
- Parameters:
listener
- anEventListener
object.filter
- anJackrabbitEventFilter
object.- Throws:
RepositoryException
- If an error occurs.
-
removeEventListener
- Specified by:
removeEventListener
in interfaceObservationManager
-
getRegisteredEventListeners
- Specified by:
getRegisteredEventListeners
in interfaceObservationManager
-
setUserData
- Specified by:
setUserData
in interfaceObservationManager
-
getEventJournal
- Specified by:
getEventJournal
in interfaceObservationManager
- Throws:
RepositoryException
-
getEventJournal
public EventJournal getEventJournal(int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName) throws RepositoryException - Specified by:
getEventJournal
in interfaceObservationManager
- Throws:
RepositoryException
-