Klasse LoggingInterceptorServiceImpl
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.yaafi.interceptor.baseservice.BaseInterceptorServiceImpl
org.apache.fulcrum.yaafi.interceptor.logging.LoggingInterceptorServiceImpl
- Alle implementierten Schnittstellen:
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,AvalonInterceptorService,LoggingInterceptorService
public class LoggingInterceptorServiceImpl
extends BaseInterceptorServiceImpl
implements LoggingInterceptorService, org.apache.avalon.framework.configuration.Reconfigurable, org.apache.avalon.framework.activity.Initializable
A service logging of service invocations. The service allows to monitor a
list of services defined in the configuration.
- 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 InterceptorToStringBuildercreateArgumentToStringBuilder(Object target) Create an instance of an InterceptorToStringBuilderprotected voidcreateStopWatch(AvalonInterceptorContext interceptorContext) Creates a stop watchprotected intprotected StopWatchgetStopWatch(AvalonInterceptorContext interceptorContext) Gets the stop watch.protected Class<?>protected Stringvoidprotected booleanvoidonEntry(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 StringtoString(AvalonInterceptorContext interceptorContext, StopWatch stopWatch, int mode) Create a method signature.protected StringtoString(AvalonInterceptorContext avalonInterceptorContext, StopWatch stopWatch, Object result) Create a string representation of a service invocation returning a result.protected StringtoString(AvalonInterceptorContext avalonInterceptorContext, StopWatch stopWatch, Throwable throwable) Create a string representation of a service invocation throwing a ThrowableVon 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, setupLogger
-
Konstruktordetails
-
LoggingInterceptorServiceImpl
public LoggingInterceptorServiceImpl()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:
-
initialize
- Angegeben von:
initializein 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:
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. Even if none is defined we return one in a proper state.- Parameter:
interceptorContext- the current interceptor context- Gibt zurück:
- the stop watch
-
getMaxArgLength
protected int getMaxArgLength()- Gibt zurück:
- Returns the maxLineLength.
-
isMonitorAllExceptions
protected boolean isMonitorAllExceptions()- Gibt zurück:
- Returns the monitorAllExceptions.
-
getToStringBuilderClass
- Gibt zurück:
- Returns the toStringBuilderClass.
-
getToStringBuilderClassName
- Gibt zurück:
- Returns the toStringBuilderClassName.
-
createArgumentToStringBuilder
Create an instance of an InterceptorToStringBuilder- Parameter:
target- the object to stringify- Gibt zurück:
- the string builder
-
toString
protected String toString(AvalonInterceptorContext avalonInterceptorContext, StopWatch stopWatch, Object result) Create a string representation of a service invocation returning a result.- Parameter:
avalonInterceptorContext- the interceptor contextstopWatch- the stopwatch for the execution timeresult- the result of the service invocation- Gibt zurück:
- the string representation of the result
-
toString
protected String toString(AvalonInterceptorContext avalonInterceptorContext, StopWatch stopWatch, Throwable throwable) Create a string representation of a service invocation throwing a Throwable- Parameter:
avalonInterceptorContext- the interceptor contextstopWatch- the stopwatch for the execution timethrowable- the result of the service invocation- Gibt zurück:
- the string representation of the result
-
toString
protected String toString(AvalonInterceptorContext interceptorContext, StopWatch stopWatch, int mode) Create a method signature.- Parameter:
interceptorContext- the avalonInterceptorContextstopWatch- the stopwatch for the execution timemode- the mode (onEntry, onExit, onError)- Gibt zurück:
- the debug output
-