org.apache.hivemind.service.impl
Class LoggingInterceptorClassFactory

java.lang.Object
  extended by org.apache.hivemind.service.impl.LoggingInterceptorClassFactory

public class LoggingInterceptorClassFactory
extends java.lang.Object

Factory for creation of interceptor classes that add logging capability to a service. The logging is based upon the Jakarta commons-logging toolkit, which makes it very transportable.

The interceptor will log entry to each method and exit from the method (with return value), plus log any exceptions thrown by the method. The logger used is the id of the service, which is not necessarily the name of the implementing class. Logging occurs at the debug level.

Author:
Howard Lewis Ship

Constructor Summary
LoggingInterceptorClassFactory(ClassFactory factory)
           
 
Method Summary
protected  void addServiceMethodImplementation(ClassFab classFab, MethodSignature sig)
           
protected  void addServiceMethods(InterceptorStack stack, ClassFab fab, java.util.List parameters)
           
protected  void addToStringMethod(InterceptorStack stack, ClassFab fab)
          Creates a toString() method that identify the interceptor service id, the intercepted service id, and the service interface class name).
 java.lang.Class constructInterceptorClass(InterceptorStack stack, java.util.List parameters)
          Creates the interceptor class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingInterceptorClassFactory

public LoggingInterceptorClassFactory(ClassFactory factory)
Method Detail

addServiceMethodImplementation

protected void addServiceMethodImplementation(ClassFab classFab,
                                              MethodSignature sig)

addServiceMethods

protected void addServiceMethods(InterceptorStack stack,
                                 ClassFab fab,
                                 java.util.List parameters)

addToStringMethod

protected void addToStringMethod(InterceptorStack stack,
                                 ClassFab fab)
Creates a toString() method that identify the interceptor service id, the intercepted service id, and the service interface class name).


constructInterceptorClass

public java.lang.Class constructInterceptorClass(InterceptorStack stack,
                                                 java.util.List parameters)
Creates the interceptor class.



Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.