|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.util.ObservationUtil
public class ObservationUtil
Util to register JCR observations. Supports delayed execution of the listener to handle event bursts.
Nested Class Summary | |
---|---|
static class |
ObservationUtil.DeferringEventListener
A listener using an ObservationUtil.ObservationBasedDelayedExecutor . |
static class |
ObservationUtil.ListBasedEventIterator
List based event iterator. |
static class |
ObservationUtil.ObservationBasedDelayedExecutor
Deferred event handling. |
Constructor Summary | |
---|---|
ObservationUtil()
|
Method Summary | |
---|---|
static void |
dispose(String workspace)
Unregisters all EventListeners for the given workspace. |
static javax.jcr.observation.EventListener |
instanciateDeferredEventListener(javax.jcr.observation.EventListener listener,
long delay,
long maxDelay)
Use this and register the returned EventListener with the registerChangeListener() methods, if you need to be able to later unregister your EventListener. |
static void |
registerChangeListener(String workspace,
String observationPath,
boolean includeSubnodes,
javax.jcr.observation.EventListener listener)
Registers an EventListener for any node type. |
static void |
registerChangeListener(String workspace,
String observationPath,
boolean includeSubnodes,
String[] nodeTypes,
javax.jcr.observation.EventListener listener)
Registers an EventListener for a specific set of node types and event types. |
static void |
registerChangeListener(String workspace,
String observationPath,
boolean includeSubnodes,
String[] nodeTypes,
int eventTypesMask,
javax.jcr.observation.EventListener listener)
Register a single event listener, bound to the given path. |
static void |
registerChangeListener(String workspace,
String observationPath,
boolean includeSubnodes,
String nodeType,
javax.jcr.observation.EventListener listener)
Registers an EventListener for a specific node type. |
static void |
registerChangeListener(String workspace,
String observationPath,
boolean includeSubnodes,
String nodeType,
int eventTypesMask,
javax.jcr.observation.EventListener listener)
Registers an EventListener for a specific node type and event types. |
static void |
registerChangeListener(String workspace,
String observationPath,
javax.jcr.observation.EventListener listener)
Registers an EventListener for any node type. |
static void |
registerDeferredChangeListener(String workspace,
String observationPath,
boolean includeSubnodes,
javax.jcr.observation.EventListener listener,
long delay,
long maxDelay)
|
static void |
registerDeferredChangeListener(String workspace,
String observationPath,
boolean includeSubnodes,
String[] nodeTypes,
javax.jcr.observation.EventListener listener,
long delay,
long maxDelay)
The event firing is deferred in case there is a series of fired events. |
static void |
registerDeferredChangeListener(String workspace,
String observationPath,
boolean includeSubnodes,
String nodeType,
javax.jcr.observation.EventListener listener,
long delay,
long maxDelay)
|
static void |
registerDeferredChangeListener(String workspace,
String observationPath,
javax.jcr.observation.EventListener listener,
long delay,
long maxDelay)
|
static void |
unregisterChangeListener(String workspace,
javax.jcr.observation.EventListener listener)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObservationUtil()
Method Detail |
---|
public static void dispose(String workspace)
public static void registerChangeListener(String workspace, String observationPath, javax.jcr.observation.EventListener listener)
registerChangeListener(String,String,boolean,String[],javax.jcr.observation.EventListener)
public static void registerChangeListener(String workspace, String observationPath, boolean includeSubnodes, javax.jcr.observation.EventListener listener)
registerChangeListener(String,String,boolean,String[],javax.jcr.observation.EventListener)
public static void registerChangeListener(String workspace, String observationPath, boolean includeSubnodes, String nodeType, javax.jcr.observation.EventListener listener)
registerChangeListener(String,String,boolean,String[],javax.jcr.observation.EventListener)
public static void registerChangeListener(String workspace, String observationPath, boolean includeSubnodes, String nodeType, int eventTypesMask, javax.jcr.observation.EventListener listener)
registerChangeListener(String,String,boolean,String[],int,javax.jcr.observation.EventListener)
public static void registerChangeListener(String workspace, String observationPath, boolean includeSubnodes, String[] nodeTypes, javax.jcr.observation.EventListener listener)
registerChangeListener(String, String, boolean, String[], int, javax.jcr.observation.EventListener)
public static void registerChangeListener(String workspace, String observationPath, boolean includeSubnodes, String[] nodeTypes, int eventTypesMask, javax.jcr.observation.EventListener listener)
workspace
- observationPath
- workspace pathincludeSubnodes
- the isDeep parameter of ObservationManager.addEventListener()nodeTypes
- the node types to filter events foreventTypesMask
- an ORed mask of even types (Event constants)listener
- event listenerObservationManager.addEventListener(javax.jcr.observation.EventListener, int, java.lang.String, boolean, java.lang.String[], java.lang.String[], boolean)
,
Event
public static void registerDeferredChangeListener(String workspace, String observationPath, javax.jcr.observation.EventListener listener, long delay, long maxDelay)
public static void registerDeferredChangeListener(String workspace, String observationPath, boolean includeSubnodes, javax.jcr.observation.EventListener listener, long delay, long maxDelay)
public static void registerDeferredChangeListener(String workspace, String observationPath, boolean includeSubnodes, String nodeType, javax.jcr.observation.EventListener listener, long delay, long maxDelay)
public static void registerDeferredChangeListener(String workspace, String observationPath, boolean includeSubnodes, String[] nodeTypes, javax.jcr.observation.EventListener listener, long delay, long maxDelay)
public static javax.jcr.observation.EventListener instanciateDeferredEventListener(javax.jcr.observation.EventListener listener, long delay, long maxDelay)
public static void unregisterChangeListener(String workspace, javax.jcr.observation.EventListener listener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |