org.apache.jackrabbit.core.observation
Class ObservationManagerImpl

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

public class ObservationManagerImpl
extends Object
implements ObservationManager, EventStateCollectionFactory

Each Session instance has its own ObservationManager instance. The class SessionLocalObservationManager implements this behaviour.


Constructor Summary
ObservationManagerImpl(ObservationDispatcher dispatcher, SessionImpl session, ItemManager itemMgr)
          Creates an ObservationManager instance.
 
Method Summary
 void addEventListener(EventListener listener, int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName, boolean noLocal)
          
 EventStateCollection createEventStateCollection()
          Creates an EventStateCollection.
 void dispose()
          Unregisters all EventListeners.
 EventListenerIterator getRegisteredEventListeners()
          
 void removeEventListener(EventListener listener)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObservationManagerImpl

public ObservationManagerImpl(ObservationDispatcher dispatcher,
                              SessionImpl session,
                              ItemManager itemMgr)
                       throws NullPointerException
Creates an ObservationManager instance.

Parameters:
dispatcher - observation dispatcher
session - the Session this ObservationManager belongs to.
itemMgr - ItemManager of the passed Session.
Throws:
NullPointerException - if session or itemMgr is null.
Method Detail

addEventListener

public void addEventListener(EventListener listener,
                             int eventTypes,
                             String absPath,
                             boolean isDeep,
                             String[] uuid,
                             String[] nodeTypeName,
                             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

dispose

public void dispose()
Unregisters all EventListeners.


createEventStateCollection

public EventStateCollection createEventStateCollection()
Creates an EventStateCollection.

Creates an EventStateCollection tied to the session which is attached to this ObservationManager instance.

Specified by:
createEventStateCollection in interface EventStateCollectionFactory
Returns:
a new EventStateCollection


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