|
||||||||||
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.jamon.JamonInterceptorServiceImpl
public class JamonInterceptorServiceImpl
A service using JAMon for performance monitoring. The implementation relies on reflection to invoke JAMON to avoid compile-time coupling.
Field Summary |
---|
Fields inherited from interface org.apache.fulcrum.yaafi.framework.interceptor.AvalonInterceptorService |
---|
ON_ENTRY, ON_ERROR, ON_EXIT |
Constructor Summary | |
---|---|
JamonInterceptorServiceImpl()
Constructor |
Method Summary | |
---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
|
protected JamonPerformanceMonitor |
createJamonPerformanceMonitor(java.lang.String serviceName,
java.lang.reflect.Method method,
boolean isEnabled)
Factory method for creating an implementation of a JamonPerformanceMonitor. |
void |
dispose()
|
void |
initialize()
|
protected boolean |
isJamonAvailable()
|
void |
onEntry(AvalonInterceptorContext interceptorContext)
Called before a service method is invoked. |
void |
onError(AvalonInterceptorContext interceptorContext,
java.lang.Throwable t)
Called when a service method throws an exeption |
void |
onExit(AvalonInterceptorContext interceptorContext,
java.lang.Object result)
Called after a service method was invoked. |
void |
reconfigure(org.apache.avalon.framework.configuration.Configuration configuration)
|
void |
run()
Writes the JAMON report to the file system. |
protected void |
writeReport()
Write a report file |
protected void |
writeReport(java.io.File reportFile)
Write the HTML report to the given destination. |
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 JamonInterceptorServiceImpl()
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 java.lang.Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
java.lang.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 dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
Disposable.dispose()
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 onExit(AvalonInterceptorContext interceptorContext, java.lang.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)
public void onError(AvalonInterceptorContext interceptorContext, java.lang.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 run()
run
in interface java.lang.Runnable
Runnable.run()
protected final boolean isJamonAvailable()
protected JamonPerformanceMonitor createJamonPerformanceMonitor(java.lang.String serviceName, java.lang.reflect.Method method, boolean isEnabled)
serviceName
- the service namemethod
- the methodisEnabled
- is the monitor enabled
protected void writeReport()
protected void writeReport(java.io.File reportFile)
reportFile
- the report destination
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |