org.apache.jackrabbit.commons.observation
Class ListenerTracker

java.lang.Object
  extended by org.apache.jackrabbit.commons.observation.ListenerTracker

public class ListenerTracker
extends Object

Tracks event deliveries to an event listener and the way the listener processes the events. The collected information is made available through the EventListenerMBean interface.


Field Summary
protected  Exception initStackTrace
           
 
Constructor Summary
ListenerTracker(EventListener listener, int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName, boolean noLocal)
           
 
Method Summary
protected  void afterEventDelivery()
          Called just after the EventListener.onEvent(EventIterator) method has been called (even if the call threw an exception).
protected  void beforeEventDelivery()
          Called just before the EventListener.onEvent(EventIterator) method is called.
 org.apache.jackrabbit.api.jmx.EventListenerMBean getListenerMBean()
           
 EventListener getTrackedListener()
           
 String toString()
           
protected  void warn(String message)
          Called to log a deprecation warning about the detected behavior of the decorated listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

initStackTrace

protected final Exception initStackTrace
Constructor Detail

ListenerTracker

public ListenerTracker(EventListener listener,
                       int eventTypes,
                       String absPath,
                       boolean isDeep,
                       String[] uuid,
                       String[] nodeTypeName,
                       boolean noLocal)
Method Detail

warn

protected void warn(String message)
Called to log a deprecation warning about the detected behavior of the decorated listener. Subclasses should override this method that by default does nothing.

Parameters:
message - warning message

beforeEventDelivery

protected void beforeEventDelivery()
Called just before the EventListener.onEvent(EventIterator) method is called. The default implementation of this method does nothing, but subclasses can override it to add custom processing.


afterEventDelivery

protected void afterEventDelivery()
Called just after the EventListener.onEvent(EventIterator) method has been called (even if the call threw an exception). The default implementation of this method does nothing, but subclasses can override it to add custom processing.


getTrackedListener

public EventListener getTrackedListener()

getListenerMBean

public org.apache.jackrabbit.api.jmx.EventListenerMBean getListenerMBean()

toString

public String toString()
Overrides:
toString in class Object


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