public class JavaSimonInterceptorServiceImpl extends BaseInterceptorServiceImpl implements JavaSimonInterceptorService, org.apache.avalon.framework.configuration.Reconfigurable, org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable
ON_ENTRY, ON_ERROR, ON_EXIT
Constructor and Description |
---|
JavaSimonInterceptorServiceImpl()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration) |
protected JavaSimonPerformanceMonitor |
createJavaSimonPerformanceMonitor(String serviceName,
Method method,
boolean isEnabled)
Factory method for creating an implementation of a
JavaSimonPerformanceMonitor.
|
void |
dispose() |
void |
initialize() |
protected boolean |
isJavaSimonAvailable() |
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) |
void |
run()
Writes the JavaSimon report to the file system.
|
protected void |
writeReport()
Write a report file
|
protected void |
writeReport(File reportFile)
Write the HTML report to the given destination.
|
contextualize, getClassLoader, getServiceApplicationDir, getServiceManager, getServiceName, getServiceTempDir, isEnabled, isServiceMonitored, makeAbsoluteFile
public JavaSimonInterceptorServiceImpl()
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(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(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(AvalonInterceptorContext)
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(AvalonInterceptorContext,
Object)
public void onError(AvalonInterceptorContext interceptorContext, Throwable t)
AvalonInterceptorService
onError
in interface AvalonInterceptorService
onError
in class BaseInterceptorServiceImpl
interceptorContext
- shared interceptor contextt
- the resulting exceptionAvalonInterceptorService.onError(AvalonInterceptorContext,
Throwable)
public void run()
run
in interface Runnable
Runnable.run()
protected final boolean isJavaSimonAvailable()
protected JavaSimonPerformanceMonitor createJavaSimonPerformanceMonitor(String serviceName, Method method, boolean isEnabled)
serviceName
- the service namemethod
- the methodisEnabled
- is the monitor enabledprotected void writeReport()
protected void writeReport(File reportFile)
reportFile
- the report destinationCopyright © 2004–1970 The Apache Software Foundation. All rights reserved.