public class ObservationManagerImpl extends Object implements ObservationManager, InternalEventListener
ObservationManagerImpl
...Constructor and Description |
---|
ObservationManagerImpl(WorkspaceManager wspManager,
NamePathResolver resolver,
NodeTypeRegistry ntRegistry)
Creates a new observation manager for
session . |
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(EventListener listener,
int eventTypes,
String absPath,
boolean isDeep,
String[] uuids,
String[] nodeTypeNames,
boolean noLocal) |
Collection<EventFilter> |
getEventFilters()
Returns a collection of event filters which is in use by this event
listener.
|
EventJournal |
getEventJournal() |
EventJournal |
getEventJournal(int eventTypes,
String absPath,
boolean isDeep,
String[] uuid,
String[] nodeTypeName) |
EventListenerIterator |
getRegisteredEventListeners() |
void |
onEvent(EventBundle eventBundle)
Gets called when an event occurs.
|
void |
removeEventListener(EventListener listener) |
void |
setUserData(String userData) |
public ObservationManagerImpl(WorkspaceManager wspManager, NamePathResolver resolver, NodeTypeRegistry ntRegistry)
session
.wspManager
- the WorkspaceManager.resolver
- the name path resolver for this session.ntRegistry
- The NodeTypeRegistry
of the session.public void addEventListener(EventListener listener, int eventTypes, String absPath, boolean isDeep, String[] uuids, String[] nodeTypeNames, boolean noLocal) throws RepositoryException
addEventListener
in interface ObservationManager
RepositoryException
public void removeEventListener(EventListener listener) throws RepositoryException
removeEventListener
in interface ObservationManager
RepositoryException
public EventListenerIterator getRegisteredEventListeners() throws RepositoryException
getRegisteredEventListeners
in interface ObservationManager
RepositoryException
public EventJournal getEventJournal() throws RepositoryException
getEventJournal
in interface ObservationManager
RepositoryException
ObservationManager.getEventJournal()
public EventJournal getEventJournal(int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName) throws RepositoryException
getEventJournal
in interface ObservationManager
RepositoryException
ObservationManager.getEventJournal(int, String, boolean, String[], String[])
public void setUserData(String userData) throws RepositoryException
setUserData
in interface ObservationManager
RepositoryException
ObservationManager.setUserData(String)
public Collection<EventFilter> getEventFilters()
InternalEventListener
InternalEventListener.onEvent(org.apache.jackrabbit.spi.EventBundle)
will be filtered
using the collection returned by this method. An event is included
in an event bundles if it is accepted by at least one of the filters
returned by this method.getEventFilters
in interface InternalEventListener
EventFilter
s currently
in use by this event listener.public void onEvent(EventBundle eventBundle)
InternalEventListener
onEvent
in interface InternalEventListener
eventBundle
- the event set received.Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.