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
-
Field Summary
Fields inherited from interface org.apache.fulcrum.yaafi.framework.interceptor.AvalonInterceptorService
ON_ENTRY, ON_ERROR, ON_EXIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(org.apache.avalon.framework.configuration.Configuration configuration) voidcontextualize(org.apache.avalon.framework.context.Context context) protected ClassLoaderprotected Fileprotected org.apache.avalon.framework.service.ServiceManagerprotected Stringprotected Fileprotected booleanprotected booleanisServiceMonitored(AvalonInterceptorContext avalonInterceptorContext) Determine if the given service is monitored.protected FilemakeAbsoluteFile(String name) Determines the file location of the given name.voidonEntry(AvalonInterceptorContext avalonInterceptorContext) Called before a service method is invoked.voidonError(AvalonInterceptorContext avalonInterceptorContext, Throwable t) Called when a service method throws an exeptionvoidonExit(AvalonInterceptorContext avalonInterceptorContext, Object result) Called after a service method was invoked.voidreconfigure(org.apache.avalon.framework.configuration.Configuration configuration) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
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:
contextualizein interfaceorg.apache.avalon.framework.context.Contextualizable- Throws:
org.apache.avalon.framework.context.ContextException- See Also:
-
configure
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException - Specified by:
configurein interfaceorg.apache.avalon.framework.configuration.Configurable- Throws:
org.apache.avalon.framework.configuration.ConfigurationException- See Also:
-
reconfigure
public void reconfigure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException - Specified by:
reconfigurein interfaceorg.apache.avalon.framework.configuration.Reconfigurable- Throws:
org.apache.avalon.framework.configuration.ConfigurationException- See Also:
-
onEntry
Description copied from interface:AvalonInterceptorServiceCalled before a service method is invoked.- Specified by:
onEntryin interfaceAvalonInterceptorService- Parameters:
avalonInterceptorContext- shared interceptor context- See Also:
-
onError
Description copied from interface:AvalonInterceptorServiceCalled when a service method throws an exeption- Specified by:
onErrorin interfaceAvalonInterceptorService- Parameters:
avalonInterceptorContext- shared interceptor contextt- the resulting exception- See Also:
-
onExit
Description copied from interface:AvalonInterceptorServiceCalled after a service method was invoked.- Specified by:
onExitin interfaceAvalonInterceptorService- Parameters:
avalonInterceptorContext- shared interceptor contextresult- the result of the invocation- See Also:
-
isEnabled
protected boolean isEnabled()- Returns:
- Returns the isEnabled.
-
isServiceMonitored
Determine if the given service is monitored.- Parameters:
avalonInterceptorContext- interceptor context- Returns:
- true if the service is monitored or false otherwise
-
getServiceApplicationDir
- Returns:
- Returns the serviceApplicationDir.
-
getServiceManager
protected org.apache.avalon.framework.service.ServiceManager getServiceManager()- Returns:
- Returns the serviceManager.
-
getServiceName
- Returns:
- Returns the serviceName.
-
getServiceTempDir
- Returns:
- Returns the serviceTempDir.
-
getClassLoader
- Returns:
- Returns the classLoader.
-
makeAbsoluteFile
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
-