mx4j.tools.adaptor.interceptor
Class TimingAdaptorInterceptor

java.lang.Object
  |
  +--mx4j.adaptor.interceptor.AdaptorInterceptor
        |
        +--mx4j.tools.adaptor.interceptor.TimingAdaptorInterceptor
All Implemented Interfaces:
AdaptorInterceptorMBean, Interceptor, Invocable

public class TimingAdaptorInterceptor
extends AdaptorInterceptor

This interceptor registers and logs invocation times along the adaptor's interceptor chain

Version:
$Revision: 1.2 $
Author:
Simone Bordet

Constructor Summary
TimingAdaptorInterceptor()
           
 
Method Summary
 java.lang.String getType()
          Returns the type of this interceptor
protected  void postInvoke(Invocation invocation)
          Called after the real invocation in the interceptor chain.
protected  void preInvoke(Invocation invocation)
          Called before the real invocation on the interceptor chain.
 
Methods inherited from class mx4j.adaptor.interceptor.AdaptorInterceptor
doInvoke, getLogger, getMBeanServer, getNext, getObjectName, invoke, isEnabled, setEnabled, setMBeanServer, setNext, setObjectName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimingAdaptorInterceptor

public TimingAdaptorInterceptor()
Method Detail

preInvoke

protected void preInvoke(Invocation invocation)
                  throws java.lang.Exception
Description copied from class: AdaptorInterceptor
Called before the real invocation on the interceptor chain.
By default does nothing; exception thrown by this method will result in AdaptorInterceptor.doInvoke(mx4j.adaptor.interceptor.Invocation) not being called. Subclasses normally override this method to perform some operation before the real invocation on the interceptor chain.
Overrides:
preInvoke in class AdaptorInterceptor
Following copied from class: mx4j.adaptor.interceptor.AdaptorInterceptor
See Also:
AdaptorInterceptor.postInvoke(mx4j.adaptor.interceptor.Invocation)

postInvoke

protected void postInvoke(Invocation invocation)
                   throws java.lang.Exception
Description copied from class: AdaptorInterceptor
Called after the real invocation in the interceptor chain.
By default does nothing; exception thrown by this method will be just logged. This method is always called, even in case of exception thrown by AdaptorInterceptor.preInvoke(mx4j.adaptor.interceptor.Invocation) or by AdaptorInterceptor.doInvoke(mx4j.adaptor.interceptor.Invocation) Subclasses normally override this method to perform some operation after the real invocation on the interceptor chain.
Overrides:
postInvoke in class AdaptorInterceptor
Following copied from class: mx4j.adaptor.interceptor.AdaptorInterceptor
See Also:
AdaptorInterceptor.preInvoke(mx4j.adaptor.interceptor.Invocation)

getType

public java.lang.String getType()
Description copied from interface: Interceptor
Returns the type of this interceptor
Overrides:
getType in class AdaptorInterceptor


Copyright © 2001-2002 MX4J Team. All Rights Reserved.