org.apache.jackrabbit.jcr2spi.observation
Class ObservationManagerImpl

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.observation.ObservationManagerImpl
All Implemented Interfaces:
ObservationManager, InternalEventListener

public class ObservationManagerImpl
extends Object
implements ObservationManager, InternalEventListener

ObservationManagerImpl...


Constructor Summary
ObservationManagerImpl(WorkspaceManager wspManager, NamePathResolver resolver, NodeTypeRegistry ntRegistry)
          Creates a new observation manager for session.
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObservationManagerImpl

public ObservationManagerImpl(WorkspaceManager wspManager,
                              NamePathResolver resolver,
                              NodeTypeRegistry ntRegistry)
Creates a new observation manager for session.

Parameters:
wspManager - the WorkspaceManager.
resolver - the name path resolver for this session.
ntRegistry - The NodeTypeRegistry of the session.
Method Detail

addEventListener

public void addEventListener(EventListener listener,
                             int eventTypes,
                             String absPath,
                             boolean isDeep,
                             String[] uuids,
                             String[] nodeTypeNames,
                             boolean noLocal)
                      throws RepositoryException
Specified by:
addEventListener in interface ObservationManager
Throws:
RepositoryException

removeEventListener

public void removeEventListener(EventListener listener)
                         throws RepositoryException
Specified by:
removeEventListener in interface ObservationManager
Throws:
RepositoryException

getRegisteredEventListeners

public EventListenerIterator getRegisteredEventListeners()
                                                  throws RepositoryException
Specified by:
getRegisteredEventListeners in interface ObservationManager
Throws:
RepositoryException

getEventJournal

public EventJournal getEventJournal()
                             throws RepositoryException
Specified by:
getEventJournal in interface ObservationManager
Throws:
RepositoryException
See Also:
ObservationManager.getEventJournal()

getEventJournal

public EventJournal getEventJournal(int eventTypes,
                                    String absPath,
                                    boolean isDeep,
                                    String[] uuid,
                                    String[] nodeTypeName)
                             throws RepositoryException
Specified by:
getEventJournal in interface ObservationManager
Throws:
RepositoryException
See Also:
ObservationManager.getEventJournal(int, String, boolean, String[], String[])

setUserData

public void setUserData(String userData)
                 throws RepositoryException
Specified by:
setUserData in interface ObservationManager
Throws:
RepositoryException
See Also:
ObservationManager.setUserData(String)

getEventFilters

public Collection<EventFilter> getEventFilters()
Description copied from interface: InternalEventListener
Returns a collection of event filters which is in use by this event listener. The event bundles delivered to 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.

Specified by:
getEventFilters in interface InternalEventListener
Returns:
an unmodifiable collection of EventFilters currently in use by this event listener.

onEvent

public void onEvent(EventBundle eventBundle)
Description copied from interface: InternalEventListener
Gets called when an event occurs.

Specified by:
onEvent in interface InternalEventListener
Parameters:
eventBundle - the event set received.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.