toolbox.services
Class JAMonInterceptor

Package class diagram package JAMonInterceptor
java.lang.Object
  extended by toolbox.services.AbstractInterceptor
      extended by toolbox.services.JAMonInterceptor
All Implemented Interfaces:
java.lang.reflect.InvocationHandler, Interceptor

public class JAMonInterceptor
extends AbstractInterceptor

Interceptor implementation to monitor Toolobx Service implementations.

This interceptor will monitor the following aspects of the interface:

The following XML fragment shows the interceptor configuration that must specified on a per service basis to enable the interceptor.

    <Interceptor class="toolbox.services.JAMonInterceptor">
      <Property name="label">My Label</Property>
    </Interceptor>
 


Constructor Summary
JAMonInterceptor()
          Default constructor.
 
Method Summary
 void init(java.util.Map config)
          Set the label that must be used by this interceptor.
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
          Invoke the given method on the target service and perform the aggregation.
 
Methods inherited from class toolbox.services.AbstractInterceptor
getObject, getTarget, invokeMethod, setObject, setTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAMonInterceptor

public JAMonInterceptor()
Default constructor.

Method Detail

init

public void init(java.util.Map config)
          throws ServiceException
Set the label that must be used by this interceptor.

Parameters:
config - Map containing interceptor configuration. This interceptor supports one property named label
Throws:
ServiceException

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Invoke the given method on the target service and perform the aggregation.

Parameters:
proxy - Proxy instance method was invoked on.
method - Method instance, of an interface method, that was invoked on the proxy.
args - Method arguments.
Returns:
Object instance containing the result of the invocation.
Throws:
java.lang.Throwable - that occured during the method invocation.