org.apache.jackrabbit.oak.jcr.observation
Class ObservationManagerImpl

java.lang.Object
  extended by org.apache.jackrabbit.oak.jcr.observation.ObservationManagerImpl
All Implemented Interfaces:
javax.jcr.observation.ObservationManager, org.apache.jackrabbit.api.observation.JackrabbitObservationManager

public class ObservationManagerImpl
extends Object
implements org.apache.jackrabbit.api.observation.JackrabbitObservationManager


Field Summary
static org.slf4j.Marker OBSERVATION
           
 
Constructor Summary
ObservationManagerImpl(SessionContext sessionContext, org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager nodeTypeManager, org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard whiteboard, int queueLength, org.apache.jackrabbit.oak.plugins.observation.CommitRateLimiter commitRateLimiter)
          Create a new instance based on a ContentSession that needs to implement Observable.
 
Method Summary
 void addEventListener(javax.jcr.observation.EventListener listener, org.apache.jackrabbit.oak.plugins.observation.filter.FilterProvider filterProvider)
          Adds an event listener that listens for the events specified by the filterProvider passed to this method.
 void addEventListener(javax.jcr.observation.EventListener listener, int eventTypes, String absPath, boolean isDeep, String[] uuids, String[] nodeTypeName, boolean noLocal)
           
 void addEventListener(javax.jcr.observation.EventListener listener, org.apache.jackrabbit.api.observation.JackrabbitEventFilter filter)
           
 void dispose()
           
 javax.jcr.observation.EventJournal getEventJournal()
           
 javax.jcr.observation.EventJournal getEventJournal(int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName)
           
 javax.jcr.observation.EventListenerIterator getRegisteredEventListeners()
           
 void removeEventListener(javax.jcr.observation.EventListener listener)
           
 void setUserData(String userData)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OBSERVATION

public static final org.slf4j.Marker OBSERVATION
Constructor Detail

ObservationManagerImpl

public ObservationManagerImpl(SessionContext sessionContext,
                              org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager nodeTypeManager,
                              org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard whiteboard,
                              int queueLength,
                              org.apache.jackrabbit.oak.plugins.observation.CommitRateLimiter commitRateLimiter)
Create a new instance based on a ContentSession that needs to implement Observable.

Parameters:
sessionContext - session delegate of the session in whose context this observation manager operates.
nodeTypeManager - node type manager for the content session
whiteboard -
Throws:
IllegalArgumentException - if contentSession doesn't implement Observable.
Method Detail

dispose

public void dispose()

addEventListener

public void addEventListener(javax.jcr.observation.EventListener listener,
                             org.apache.jackrabbit.oak.plugins.observation.filter.FilterProvider filterProvider)
Adds an event listener that listens for the events specified by the filterProvider 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 same EventListener 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 - an EventListener object.
filterProvider - filter provider specifying the filter for this listener

addEventListener

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

addEventListener

public void addEventListener(javax.jcr.observation.EventListener listener,
                             org.apache.jackrabbit.api.observation.JackrabbitEventFilter filter)
                      throws javax.jcr.RepositoryException
Specified by:
addEventListener in interface org.apache.jackrabbit.api.observation.JackrabbitObservationManager
Throws:
javax.jcr.RepositoryException

removeEventListener

public void removeEventListener(javax.jcr.observation.EventListener listener)
Specified by:
removeEventListener in interface javax.jcr.observation.ObservationManager

getRegisteredEventListeners

public javax.jcr.observation.EventListenerIterator getRegisteredEventListeners()
                                                                        throws javax.jcr.RepositoryException
Specified by:
getRegisteredEventListeners in interface javax.jcr.observation.ObservationManager
Throws:
javax.jcr.RepositoryException

setUserData

public void setUserData(@Nullable
                        String userData)
Specified by:
setUserData in interface javax.jcr.observation.ObservationManager

getEventJournal

public javax.jcr.observation.EventJournal getEventJournal()
                                                   throws javax.jcr.RepositoryException
Specified by:
getEventJournal in interface javax.jcr.observation.ObservationManager
Throws:
javax.jcr.RepositoryException

getEventJournal

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


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.