|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.yaafi.interceptor.baseservice.BaseInterceptorServiceImpl
org.apache.fulcrum.yaafi.interceptor.logging.LoggingInterceptorServiceImpl
public class LoggingInterceptorServiceImpl
A service logging of service invocations. The service allows to monitor a list of services defined in the configuration.
Field Summary |
---|
Fields inherited from interface org.apache.fulcrum.yaafi.framework.interceptor.AvalonInterceptorService |
---|
ON_ENTRY, ON_ERROR, ON_EXIT |
Constructor Summary | |
---|---|
LoggingInterceptorServiceImpl()
Constructor |
Method Summary | |
---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
|
protected InterceptorToStringBuilder |
createArgumentToStringBuilder(Object target)
Create an instance of an InterceptorToStringBuilder |
protected void |
createStopWatch(AvalonInterceptorContext interceptorContext)
Creates a stop watch |
protected int |
getMaxArgLength()
|
protected StopWatch |
getStopWatch(AvalonInterceptorContext interceptorContext)
Gets the stop watch. |
protected Class |
getToStringBuilderClass()
|
protected String |
getToStringBuilderClassName()
|
void |
initialize()
|
protected boolean |
isMonitorAllExceptions()
|
void |
onEntry(AvalonInterceptorContext interceptorContext)
Called before a service method is invoked. |
void |
onError(AvalonInterceptorContext interceptorContext,
Throwable t)
Called when a service method throws an exeption |
void |
onExit(AvalonInterceptorContext interceptorContext,
Object result)
Called after a service method was invoked. |
void |
reconfigure(org.apache.avalon.framework.configuration.Configuration configuration)
|
protected String |
toString(AvalonInterceptorContext interceptorContext,
StopWatch stopWatch,
int mode)
Create a method signature. |
protected String |
toString(AvalonInterceptorContext avalonInterceptorContext,
StopWatch stopWatch,
Object result)
Create a string representation of a service invocation returning a result. |
protected String |
toString(AvalonInterceptorContext avalonInterceptorContext,
StopWatch stopWatch,
Throwable throwable)
Create a string representation of a service invocation throwing a Throwable |
Methods inherited from class org.apache.fulcrum.yaafi.interceptor.baseservice.BaseInterceptorServiceImpl |
---|
contextualize, getClassLoader, getServiceApplicationDir, getServiceManager, getServiceName, getServiceTempDir, isEnabled, isServiceMonitored, makeAbsoluteFile |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LoggingInterceptorServiceImpl()
Method Detail |
---|
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
configure
in class BaseInterceptorServiceImpl
org.apache.avalon.framework.configuration.ConfigurationException
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)
public void initialize() throws Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
Exception
Initializable.initialize()
public void reconfigure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
reconfigure
in interface org.apache.avalon.framework.configuration.Reconfigurable
reconfigure
in class BaseInterceptorServiceImpl
org.apache.avalon.framework.configuration.ConfigurationException
Reconfigurable.reconfigure(org.apache.avalon.framework.configuration.Configuration)
public void onEntry(AvalonInterceptorContext interceptorContext)
AvalonInterceptorService
onEntry
in interface AvalonInterceptorService
onEntry
in class BaseInterceptorServiceImpl
interceptorContext
- shared interceptor contextAvalonInterceptorService.onEntry(org.apache.fulcrum.yaafi.framework.interceptor.AvalonInterceptorContext)
public void onError(AvalonInterceptorContext interceptorContext, Throwable t)
AvalonInterceptorService
onError
in interface AvalonInterceptorService
onError
in class BaseInterceptorServiceImpl
interceptorContext
- shared interceptor contextt
- the resulting exceptionAvalonInterceptorService.onError(org.apache.fulcrum.yaafi.framework.interceptor.AvalonInterceptorContext, java.lang.Throwable)
public void onExit(AvalonInterceptorContext interceptorContext, Object result)
AvalonInterceptorService
onExit
in interface AvalonInterceptorService
onExit
in class BaseInterceptorServiceImpl
interceptorContext
- shared interceptor contextresult
- the result of the invocationAvalonInterceptorService.onExit(org.apache.fulcrum.yaafi.framework.interceptor.AvalonInterceptorContext, java.lang.Object)
protected void createStopWatch(AvalonInterceptorContext interceptorContext)
interceptorContext
- the current interceptor contextprotected StopWatch getStopWatch(AvalonInterceptorContext interceptorContext)
interceptorContext
- the current interceptor context
protected int getMaxArgLength()
protected boolean isMonitorAllExceptions()
protected Class getToStringBuilderClass()
protected String getToStringBuilderClassName()
protected InterceptorToStringBuilder createArgumentToStringBuilder(Object target)
target
- the object to stringify
protected String toString(AvalonInterceptorContext avalonInterceptorContext, StopWatch stopWatch, Object result)
avalonInterceptorContext
- the interceptor contextstopWatch
- the stopwatch for the execution timeresult
- the result of the service invocation
protected String toString(AvalonInterceptorContext avalonInterceptorContext, StopWatch stopWatch, Throwable throwable)
avalonInterceptorContext
- the interceptor contextstopWatch
- the stopwatch for the execution timethrowable
- the result of the service invocation
protected String toString(AvalonInterceptorContext interceptorContext, StopWatch stopWatch, int mode)
interceptorContext
- the avalonInterceptorContextstopWatch
- the stopwatch for the execution timemode
- the mode (onEntry, onExit, onError)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |