Class BaseInterceptorServiceImpl

java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.yaafi.interceptor.baseservice.BaseInterceptorServiceImpl
All Implemented Interfaces:
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
Direct Known Subclasses:
JamonInterceptorServiceImpl, JavaSimonInterceptorServiceImpl, LoggingInterceptorServiceImpl, PerformanceInterceptorServiceImpl

public class BaseInterceptorServiceImpl extends org.apache.avalon.framework.logger.AbstractLogEnabled implements AvalonInterceptorService, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.configuration.Reconfigurable
A base service providing common functionality for interceptors
Author:
Siegfried Goeschl
  • Constructor Details

    • BaseInterceptorServiceImpl

      public BaseInterceptorServiceImpl()
      Constructor
  • Method Details

    • contextualize

      public void contextualize(org.apache.avalon.framework.context.Context context) throws org.apache.avalon.framework.context.ContextException
      Specified by:
      contextualize in interface org.apache.avalon.framework.context.Contextualizable
      Throws:
      org.apache.avalon.framework.context.ContextException
      See Also:
      • Contextualizable.contextualize(org.apache.avalon.framework.context.Context)
    • configure

      public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
      Specified by:
      configure in interface org.apache.avalon.framework.configuration.Configurable
      Throws:
      org.apache.avalon.framework.configuration.ConfigurationException
      See Also:
      • Configurable.configure(org.apache.avalon.framework.configuration.Configuration)
    • reconfigure

      public void reconfigure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
      Specified by:
      reconfigure in interface org.apache.avalon.framework.configuration.Reconfigurable
      Throws:
      org.apache.avalon.framework.configuration.ConfigurationException
      See Also:
      • Reconfigurable.reconfigure(org.apache.avalon.framework.configuration.Configuration)
    • onEntry

      public void onEntry(AvalonInterceptorContext avalonInterceptorContext)
      Description copied from interface: AvalonInterceptorService
      Called before a service method is invoked.
      Specified by:
      onEntry in interface AvalonInterceptorService
      Parameters:
      avalonInterceptorContext - shared interceptor context
      See Also:
    • onError

      public void onError(AvalonInterceptorContext avalonInterceptorContext, Throwable t)
      Description copied from interface: AvalonInterceptorService
      Called when a service method throws an exeption
      Specified by:
      onError in interface AvalonInterceptorService
      Parameters:
      avalonInterceptorContext - shared interceptor context
      t - the resulting exception
      See Also:
    • onExit

      public void onExit(AvalonInterceptorContext avalonInterceptorContext, Object result)
      Description copied from interface: AvalonInterceptorService
      Called after a service method was invoked.
      Specified by:
      onExit in interface AvalonInterceptorService
      Parameters:
      avalonInterceptorContext - shared interceptor context
      result - the result of the invocation
      See Also:
    • isEnabled

      protected boolean isEnabled()
      Returns:
      Returns the isEnabled.
    • isServiceMonitored

      protected boolean isServiceMonitored(AvalonInterceptorContext avalonInterceptorContext)
      Determine if the given service is monitored.
      Parameters:
      avalonInterceptorContext - interceptor context
      Returns:
      true if the service is monitored or false otherwise
    • getServiceApplicationDir

      protected File getServiceApplicationDir()
      Returns:
      Returns the serviceApplicationDir.
    • getServiceManager

      protected org.apache.avalon.framework.service.ServiceManager getServiceManager()
      Returns:
      Returns the serviceManager.
    • getServiceName

      protected String getServiceName()
      Returns:
      Returns the serviceName.
    • getServiceTempDir

      protected File getServiceTempDir()
      Returns:
      Returns the serviceTempDir.
    • getClassLoader

      protected ClassLoader getClassLoader()
      Returns:
      Returns the classLoader.
    • makeAbsoluteFile

      protected File makeAbsoluteFile(String name)
      Determines the file location of the given name. If the name denotes a relative file location it will be resolved using the application home directory.
      Parameters:
      name - the filename
      Returns:
      the file