Klasse PerformanceInterceptorServiceImpl
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.yaafi.interceptor.baseservice.BaseInterceptorServiceImpl
org.apache.fulcrum.yaafi.interceptor.performance.PerformanceInterceptorServiceImpl
- Alle implementierten Schnittstellen:
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,PerformanceInterceptorService
public class PerformanceInterceptorServiceImpl
extends BaseInterceptorServiceImpl
implements PerformanceInterceptorService, org.apache.avalon.framework.configuration.Reconfigurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.thread.ThreadSafe
A service logging the execution time of service invocations.
- 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 TypMethodeBeschreibungvoidconfigure(org.apache.avalon.framework.configuration.Configuration configuration) protected voidcreateStopWatch(AvalonInterceptorContext interceptorContext) Creates a stop watchprotected StopWatchgetStopWatch(AvalonInterceptorContext interceptorContext) Gets the stop watchprotected voidlog(int mode, AvalonInterceptorContext interceptorContext, StopWatch stopWatch) Logs the execution time.voidonEntry(AvalonInterceptorContext interceptorContext) Called before a service method is invoked.voidonError(AvalonInterceptorContext interceptorContext, Throwable t) Called when a service method throws an exeptionvoidonExit(AvalonInterceptorContext interceptorContext, Object result) Called after a service method was invoked.voidreconfigure(org.apache.avalon.framework.configuration.Configuration configuration) protected StringPrints the argument list.protected StringtoString(AvalonInterceptorContext interceptorContext, StopWatch stopWatch, int mode) Create the log message for the performance logfile.Von Klasse geerbte Methoden org.apache.fulcrum.yaafi.interceptor.baseservice.BaseInterceptorServiceImpl
contextualize, getClassLoader, getServiceApplicationDir, getServiceManager, getServiceName, getServiceTempDir, isEnabled, isServiceMonitored, makeAbsoluteFileVon Klasse geerbte Methoden org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden org.apache.avalon.framework.context.Contextualizable
contextualize
-
Konstruktordetails
-
PerformanceInterceptorServiceImpl
public PerformanceInterceptorServiceImpl()Constructor
-
-
Methodendetails
-
configure
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException - Angegeben von:
configurein Schnittstelleorg.apache.avalon.framework.configuration.Configurable- Setzt außer Kraft:
configurein KlasseBaseInterceptorServiceImpl- Löst aus:
org.apache.avalon.framework.configuration.ConfigurationException- Siehe auch:
-
reconfigure
public void reconfigure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException - Angegeben von:
reconfigurein Schnittstelleorg.apache.avalon.framework.configuration.Reconfigurable- Setzt außer Kraft:
reconfigurein KlasseBaseInterceptorServiceImpl- Löst aus:
org.apache.avalon.framework.configuration.ConfigurationException- Siehe auch:
-
onEntry
Beschreibung aus Schnittstelle kopiert:AvalonInterceptorServiceCalled before a service method is invoked.- Angegeben von:
onEntryin SchnittstelleAvalonInterceptorService- Setzt außer Kraft:
onEntryin KlasseBaseInterceptorServiceImpl- Parameter:
interceptorContext- shared interceptor context- Siehe auch:
-
onError
Beschreibung aus Schnittstelle kopiert:AvalonInterceptorServiceCalled when a service method throws an exeption- Angegeben von:
onErrorin SchnittstelleAvalonInterceptorService- Setzt außer Kraft:
onErrorin KlasseBaseInterceptorServiceImpl- Parameter:
interceptorContext- shared interceptor contextt- the resulting exception- Siehe auch:
-
onExit
Beschreibung aus Schnittstelle kopiert:AvalonInterceptorServiceCalled after a service method was invoked.- Angegeben von:
onExitin SchnittstelleAvalonInterceptorService- Setzt außer Kraft:
onExitin KlasseBaseInterceptorServiceImpl- Parameter:
interceptorContext- shared interceptor contextresult- the result of the invocation- Siehe auch:
-
createStopWatch
Creates a stop watch- Parameter:
interceptorContext- the current interceptor context
-
getStopWatch
Gets the stop watch- Parameter:
interceptorContext- the current interceptor context- Gibt zurück:
- the stop watch
-
log
Logs the execution time.- Parameter:
mode- the invocation mode (onEntry, onExit, onError)interceptorContext- the current interceptor contextstopWatch- the stop watch
-
toString
protected String toString(AvalonInterceptorContext interceptorContext, StopWatch stopWatch, int mode) Create the log message for the performance logfile.- Parameter:
interceptorContext- the contextstopWatch- the stopwatchmode- the mode (onEntry, onExit, onError)- Gibt zurück:
- the log message
-
toString
Prints the argument list.- Parameter:
args- array of arguments- Gibt zurück:
- the debug output
-