Class AdviceServiceImpl
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.yaafi.service.advice.AdviceServiceImpl
- 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,org.apache.avalon.framework.service.Serviceable,AdviceService
public class AdviceServiceImpl
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements AdviceService, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.configuration.Reconfigurable
Simple service providing interceptor advices for ordinary POJOs. Since the
implementation uses Dynamic Proxies only methods invoked by an interface can
be advised.
- Author:
- Siegfried Goeschl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdvice the object with a the list of default AvalonInterceptorServices.Advice the object with a list of AvalonInterceptorServices.Advice the object with a the list of default AvalonInterceptorServices.Advice the object with a list of AvalonInterceptorServices.voidconfigure(org.apache.avalon.framework.configuration.Configuration configuration) voidcontextualize(org.apache.avalon.framework.context.Context context) protected ObjectDoes the actual work of advising the object.booleanIs the given object already adviced?voidreconfigure(org.apache.avalon.framework.configuration.Configuration configuration) voidservice(org.apache.avalon.framework.service.ServiceManager serviceManager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
AdviceServiceImpl
public AdviceServiceImpl()
-
-
Method Details
-
service
public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException - Specified by:
servicein interfaceorg.apache.avalon.framework.service.Serviceable- Throws:
org.apache.avalon.framework.service.ServiceException- See Also:
-
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:
-
advice
Description copied from interface:AdviceServiceAdvice the object with a the list of default AvalonInterceptorServices.- Specified by:
advicein interfaceAdviceService- Parameters:
object- the object to be advised- Returns:
- the advised object
- See Also:
-
advice
Description copied from interface:AdviceServiceAdvice the object with a the list of default AvalonInterceptorServices.- Specified by:
advicein interfaceAdviceService- Parameters:
name- the name of the objectobject- the object to be advised- Returns:
- the advised object
-
advice
Description copied from interface:AdviceServiceAdvice the object with a list of AvalonInterceptorServices.- Specified by:
advicein interfaceAdviceService- Parameters:
interceptorList- the list of service namesobject- the object to be advised- Returns:
- the advised object
-
advice
Description copied from interface:AdviceServiceAdvice the object with a list of AvalonInterceptorServices.- Specified by:
advicein interfaceAdviceService- Parameters:
name- the associated name of the objectinterceptorList- the list of service namesobject- the object to be advised- Returns:
- the advised object
-
isAdviced
Description copied from interface:AdviceServiceIs the given object already adviced?- Specified by:
isAdvicedin interfaceAdviceService- Parameters:
object- the object to check- Returns:
- true if the object is an dynamic proxy
-
doAdvice
Does the actual work of advising the object.- Parameters:
name- the name of the object to be advisedinterceptorList- the list of interceptor services to advise the objectobject- the object to be advised- Returns:
- the advised object.
-