Class ReconfigurationServiceImpl
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.yaafi.service.reconfiguration.ReconfigurationServiceImpl
- All Implemented Interfaces:
Runnable,org.apache.avalon.framework.activity.Disposable,org.apache.avalon.framework.activity.Initializable,org.apache.avalon.framework.activity.Startable,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,ReconfigurationService
public class ReconfigurationServiceImpl
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements ReconfigurationService, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.configuration.Reconfigurable, org.apache.avalon.framework.activity.Initializable, Runnable, org.apache.avalon.framework.activity.Startable, org.apache.avalon.framework.activity.Disposable
Monitors the componentConfiguration.xml and triggers a reconfiguration if the
content of the component configuration file has changed.
- Author:
- Siegfried Goeschl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(org.apache.avalon.framework.configuration.Configuration configuration) voidcontextualize(org.apache.avalon.framework.context.Context context) voiddispose()voidprotected voidonReconfigure(ReconfigurationEntry reconfigurationEntry) Reconfigure either the whole container or a list of services.voidreconfigure(org.apache.avalon.framework.configuration.Configuration configuration) voidrun()Polls for changes in the confguration to reconfigure either the whole container or just a list of services.voidservice(org.apache.avalon.framework.service.ServiceManager manager) voidstart()voidstop()Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
ReconfigurationServiceImpl
public ReconfigurationServiceImpl()Constructor
-
-
Method Details
-
service
public void service(org.apache.avalon.framework.service.ServiceManager manager) 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:
-
initialize
- Specified by:
initializein interfaceorg.apache.avalon.framework.activity.Initializable- Throws:
Exception- See Also:
-
start
- Specified by:
startin interfaceorg.apache.avalon.framework.activity.Startable- Throws:
Exception- See Also:
-
stop
- Specified by:
stopin interfaceorg.apache.avalon.framework.activity.Startable- Throws:
Exception- See Also:
-
dispose
public void dispose()- Specified by:
disposein interfaceorg.apache.avalon.framework.activity.Disposable- 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:
-
run
public void run()Polls for changes in the confguration to reconfigure either the whole container or just a list of services. -
onReconfigure
Reconfigure either the whole container or a list of services. This method is called within a seperate worker thred.- Parameters:
reconfigurationEntry- the configuration what to reconfigure- Throws:
Exception- the reconfiguration failed
-