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 aContentSessionthat needs to implementObservable. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEventListener(EventListener listener, int eventTypes, String absPath, boolean isDeep, String[] uuids, String[] nodeTypeName, boolean noLocal) voidaddEventListener(EventListener listener, JackrabbitEventFilter filter) Adds an event listener that listens for the events specified by the passedJackrabbitEventFilter.voidaddEventListener(EventListener listener, FilterProvider filterProvider) Adds an event listener that listens for the events specified by thefilterProviderpassed to this method.voiddispose()getEventJournal(int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName) voidremoveEventListener(EventListener listener) voidsetUserData(@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 aContentSessionthat 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- ifcontentSessiondoesn't implementObservable.
-
-
Method Details
-
dispose
public void dispose() -
addEventListener
Adds an event listener that listens for the events specified by thefilterProviderpassed 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
EventListenercan be changed at runtime by re-registering the sameEventListenerobject (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- anEventListenerobject.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:
addEventListenerin interfaceObservationManager- Throws:
RepositoryException
-
addEventListener
public void addEventListener(EventListener listener, JackrabbitEventFilter filter) throws RepositoryException Description copied from interface:JackrabbitObservationManagerAdds 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
JackrabbitEventFilterfor a description of the filtering parameters available.The filter of an already-registered
EventListenercan be changed at runtime by re-registering the sameEventListenerobject (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:systemsubgraph may not be supported.- Specified by:
addEventListenerin interfaceJackrabbitObservationManager- Parameters:
listener- anEventListenerobject.filter- anJackrabbitEventFilterobject.- Throws:
RepositoryException- If an error occurs.
-
removeEventListener
- Specified by:
removeEventListenerin interfaceObservationManager
-
getRegisteredEventListeners
- Specified by:
getRegisteredEventListenersin interfaceObservationManager
-
setUserData
- Specified by:
setUserDatain interfaceObservationManager
-
getEventJournal
- Specified by:
getEventJournalin interfaceObservationManager- Throws:
RepositoryException
-
getEventJournal
public EventJournal getEventJournal(int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName) throws RepositoryException - Specified by:
getEventJournalin interfaceObservationManager- Throws:
RepositoryException
-