public class LoggingInterceptorFactory extends java.lang.Object implements ServiceInterceptorFactory
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.
Constructor and Description |
---|
LoggingInterceptorFactory() |
Modifier and Type | Method and Description |
---|---|
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).
|
void |
createInterceptor(InterceptorStack stack,
Module contributingModule,
java.util.List parameters)
Creates the interceptor.
|
void |
setFactory(ClassFactory factory) |
void |
setServiceId(java.lang.String string) |
public LoggingInterceptorFactory()
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)
public void createInterceptor(InterceptorStack stack, Module contributingModule, java.util.List parameters)
createInterceptor
in interface ServiceInterceptorFactory
public void setFactory(ClassFactory factory)
public void setServiceId(java.lang.String string)