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
  • 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:
      configure in Schnittstelle org.apache.avalon.framework.configuration.Configurable
      Setzt außer Kraft:
      configure in Klasse BaseInterceptorServiceImpl
      Löst aus:
      org.apache.avalon.framework.configuration.ConfigurationException
      Siehe auch:
      • Configurable.configure(org.apache.avalon.framework.configuration.Configuration)
    • initialize

      public void initialize() throws Exception
      Angegeben von:
      initialize in Schnittstelle org.apache.avalon.framework.activity.Initializable
      Löst aus:
      Exception
      Siehe auch:
      • Initializable.initialize()
    • reconfigure

      public void reconfigure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
      Angegeben von:
      reconfigure in Schnittstelle org.apache.avalon.framework.configuration.Reconfigurable
      Setzt außer Kraft:
      reconfigure in Klasse BaseInterceptorServiceImpl
      Löst aus:
      org.apache.avalon.framework.configuration.ConfigurationException
      Siehe auch:
      • Reconfigurable.reconfigure(org.apache.avalon.framework.configuration.Configuration)
    • onEntry

      public void onEntry(AvalonInterceptorContext interceptorContext)
      Beschreibung aus Schnittstelle kopiert: AvalonInterceptorService
      Called before a service method is invoked.
      Angegeben von:
      onEntry in Schnittstelle AvalonInterceptorService
      Setzt außer Kraft:
      onEntry in Klasse BaseInterceptorServiceImpl
      Parameter:
      interceptorContext - shared interceptor context
      Siehe auch:
    • onError

      public void onError(AvalonInterceptorContext interceptorContext, Throwable t)
      Beschreibung aus Schnittstelle kopiert: AvalonInterceptorService
      Called when a service method throws an exeption
      Angegeben von:
      onError in Schnittstelle AvalonInterceptorService
      Setzt außer Kraft:
      onError in Klasse BaseInterceptorServiceImpl
      Parameter:
      interceptorContext - shared interceptor context
      t - the resulting exception
      Siehe auch:
    • onExit

      public void onExit(AvalonInterceptorContext interceptorContext, Object result)
      Beschreibung aus Schnittstelle kopiert: AvalonInterceptorService
      Called after a service method was invoked.
      Angegeben von:
      onExit in Schnittstelle AvalonInterceptorService
      Setzt außer Kraft:
      onExit in Klasse BaseInterceptorServiceImpl
      Parameter:
      interceptorContext - shared interceptor context
      result - the result of the invocation
      Siehe auch:
    • createStopWatch

      protected void createStopWatch(AvalonInterceptorContext interceptorContext)
      Creates a stop watch
      Parameter:
      interceptorContext - the current interceptor context
    • getStopWatch

      protected StopWatch getStopWatch(AvalonInterceptorContext interceptorContext)
      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

      protected Class<?> getToStringBuilderClass()
      Gibt zurück:
      Returns the toStringBuilderClass.
    • getToStringBuilderClassName

      protected String getToStringBuilderClassName()
      Gibt zurück:
      Returns the toStringBuilderClassName.
    • createArgumentToStringBuilder

      protected InterceptorToStringBuilder createArgumentToStringBuilder(Object target)
      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 context
      stopWatch - the stopwatch for the execution time
      result - 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 context
      stopWatch - the stopwatch for the execution time
      throwable - 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 avalonInterceptorContext
      stopWatch - the stopwatch for the execution time
      mode - the mode (onEntry, onExit, onError)
      Gibt zurück:
      the debug output