Klasse JamonInterceptorServiceImpl
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.yaafi.interceptor.baseservice.BaseInterceptorServiceImpl
org.apache.fulcrum.yaafi.interceptor.jamon.JamonInterceptorServiceImpl
- Alle implementierten Schnittstellen:
Runnable
,org.apache.avalon.framework.activity.Disposable
,org.apache.avalon.framework.activity.Initializable
,org.apache.avalon.framework.configuration.Configurable
,org.apache.avalon.framework.configuration.Reconfigurable
,org.apache.avalon.framework.context.Contextualizable
,org.apache.avalon.framework.logger.LogEnabled
,org.apache.avalon.framework.thread.ThreadSafe
,AvalonInterceptorService
,JamonInterceptorService
public class JamonInterceptorServiceImpl
extends BaseInterceptorServiceImpl
implements JamonInterceptorService, org.apache.avalon.framework.configuration.Reconfigurable, org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable
A service using JAMon for performance monitoring. The implementation relies
on reflection to invoke JAMON to avoid compile-time coupling.
- Autor:
- Siegfried Goeschl
-
Feldübersicht
Von Schnittstelle geerbte Felder org.apache.fulcrum.yaafi.framework.interceptor.AvalonInterceptorService
ON_ENTRY, ON_ERROR, ON_EXIT
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
configure
(org.apache.avalon.framework.configuration.Configuration configuration) protected JamonPerformanceMonitor
createJamonPerformanceMonitor
(String serviceName, Method method, boolean isEnabled) Factory method for creating an implementation of a JamonPerformanceMonitor.void
dispose()
void
protected final boolean
void
onEntry
(AvalonInterceptorContext interceptorContext) Called before a service method is invoked.void
onError
(AvalonInterceptorContext interceptorContext, Throwable t) Called when a service method throws an exeptionvoid
onExit
(AvalonInterceptorContext interceptorContext, 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
Write a report fileprotected void
writeReport
(File reportFile) Write the HTML report to the given destination.Von Klasse geerbte Methoden org.apache.fulcrum.yaafi.interceptor.baseservice.BaseInterceptorServiceImpl
contextualize, getClassLoader, getServiceApplicationDir, getServiceManager, getServiceName, getServiceTempDir, isEnabled, isServiceMonitored, makeAbsoluteFile
Von Klasse geerbte Methoden org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Konstruktordetails
-
JamonInterceptorServiceImpl
public JamonInterceptorServiceImpl()Constructor
-
-
Methodendetails
-
configure
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException - Angegeben von:
configure
in Schnittstelleorg.apache.avalon.framework.configuration.Configurable
- Setzt außer Kraft:
configure
in KlasseBaseInterceptorServiceImpl
- Löst aus:
org.apache.avalon.framework.configuration.ConfigurationException
- Siehe auch:
-
initialize
- Angegeben von:
initialize
in Schnittstelleorg.apache.avalon.framework.activity.Initializable
- Löst aus:
Exception
- Siehe auch:
-
reconfigure
public void reconfigure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException - Angegeben von:
reconfigure
in Schnittstelleorg.apache.avalon.framework.configuration.Reconfigurable
- Setzt außer Kraft:
reconfigure
in KlasseBaseInterceptorServiceImpl
- Löst aus:
org.apache.avalon.framework.configuration.ConfigurationException
- Siehe auch:
-
dispose
public void dispose()- Angegeben von:
dispose
in Schnittstelleorg.apache.avalon.framework.activity.Disposable
- Siehe auch:
-
onEntry
Beschreibung aus Schnittstelle kopiert:AvalonInterceptorService
Called before a service method is invoked.- Angegeben von:
onEntry
in SchnittstelleAvalonInterceptorService
- Setzt außer Kraft:
onEntry
in KlasseBaseInterceptorServiceImpl
- Parameter:
interceptorContext
- shared interceptor context- Siehe auch:
-
onExit
Beschreibung aus Schnittstelle kopiert:AvalonInterceptorService
Called after a service method was invoked.- Angegeben von:
onExit
in SchnittstelleAvalonInterceptorService
- Setzt außer Kraft:
onExit
in KlasseBaseInterceptorServiceImpl
- Parameter:
interceptorContext
- shared interceptor contextresult
- the result of the invocation- Siehe auch:
-
onError
Beschreibung aus Schnittstelle kopiert:AvalonInterceptorService
Called when a service method throws an exeption- Angegeben von:
onError
in SchnittstelleAvalonInterceptorService
- Setzt außer Kraft:
onError
in KlasseBaseInterceptorServiceImpl
- Parameter:
interceptorContext
- shared interceptor contextt
- the resulting exception- Siehe auch:
-
run
public void run()Writes the JAMON report to the file system. -
isJamonAvailable
protected final boolean isJamonAvailable()- Gibt zurück:
- Returns true if JAMon is availble.
-
createJamonPerformanceMonitor
protected JamonPerformanceMonitor createJamonPerformanceMonitor(String serviceName, Method method, boolean isEnabled) Factory method for creating an implementation of a JamonPerformanceMonitor.- Parameter:
serviceName
- the service namemethod
- the methodisEnabled
- is the monitor enabled- Gibt zurück:
- the instance or null if the creation failed
-
writeReport
protected void writeReport()Write a report file -
writeReport
Write the HTML report to the given destination.- Parameter:
reportFile
- the report destination
-