Class AvalonServiceComponentImpl
java.lang.Object
org.apache.fulcrum.yaafi.framework.component.ServiceComponentImpl
org.apache.fulcrum.yaafi.framework.component.AvalonServiceComponentImpl
- All Implemented Interfaces:
ServiceComponent,ServiceComponentLifecycle
This class implements a service component singleton with
an arbitrary lifecycle.
- Author:
- Siegfried Goeschl
-
Constructor Summary
ConstructorsConstructorDescriptionAvalonServiceComponentImpl(RoleEntry roleEntry, org.apache.avalon.framework.logger.Logger parentLogger, org.apache.avalon.framework.logger.Logger logger) Constructor to parse the configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(org.apache.avalon.framework.configuration.Configuration configuration) voidcontextualize(org.apache.avalon.framework.context.Context context) voidDecommisions a service component instance.voidenableLogging(org.apache.avalon.framework.logger.Logger logger) voidexecute()protected voidvoidvoidparameterize(org.apache.avalon.framework.parameters.Parameters parameters) voidReconfigures a service component instancevoidreconfigure(org.apache.avalon.framework.configuration.Configuration configuration) voidresume()voidservice(org.apache.avalon.framework.service.ServiceManager serviceManager) voidstart()voidstop()voidsuspend()Methods inherited from class org.apache.fulcrum.yaafi.framework.component.ServiceComponentImpl
createInstance, dispose, getConfiguration, getContext, getImplementationClazz, getInstance, getLogger, getName, getParamaters, getParentLogger, getRawInstance, getRoleEntry, getServiceManager, getShorthand, incarnate, isEarlyInit, isInstantiated, loadImplemtationClass, setConfiguration, setContext, setLogger, setParameters, setProxyInstance, setServiceManager, toString
-
Constructor Details
-
AvalonServiceComponentImpl
public AvalonServiceComponentImpl(RoleEntry roleEntry, org.apache.avalon.framework.logger.Logger parentLogger, org.apache.avalon.framework.logger.Logger logger) Constructor to parse the configuration.- Parameters:
roleEntry- The information extracted from the role configuration fileparentLogger- the logger of the service containerlogger- The logger for the service instance
-
-
Method Details
-
incarnateInstance
- Specified by:
incarnateInstancein classServiceComponentImpl- Throws:
Exception- generic exception- See Also:
-
reconfigure
Description copied from interface:ServiceComponentLifecycleReconfigures a service component instance- Specified by:
reconfigurein interfaceServiceComponentLifecycle- Specified by:
reconfigurein classServiceComponentImpl- Throws:
Exception- the operation failed
-
decommision
Description copied from interface:ServiceComponentLifecycleDecommisions a service component instance.- Specified by:
decommisionin interfaceServiceComponentLifecycle- Overrides:
decommisionin classServiceComponentImpl- Throws:
Exception- the operation failed
-
enableLogging
public void enableLogging(org.apache.avalon.framework.logger.Logger logger) - Parameters:
logger- logger to enable- See Also:
-
contextualize
public void contextualize(org.apache.avalon.framework.context.Context context) throws org.apache.avalon.framework.context.ContextException - Parameters:
context- the context to add to this service- Throws:
org.apache.avalon.framework.context.ContextException- if unable to contextualize- See Also:
-
service
public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException - Parameters:
serviceManager- instance of the service manager to work with- Throws:
org.apache.avalon.framework.service.ServiceException- throws exception if service failed for any reason- See Also:
-
configure
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException - Parameters:
configuration- the configuration- Throws:
org.apache.avalon.framework.configuration.ConfigurationException- if fails to contextualize the config- See Also:
-
parameterize
public void parameterize(org.apache.avalon.framework.parameters.Parameters parameters) throws org.apache.avalon.framework.parameters.ParameterException - Parameters:
parameters- the parameters- Throws:
org.apache.avalon.framework.parameters.ParameterException- if unable to set the parameters- See Also:
-
initialize
- Throws:
Exception- generic exception- See Also:
-
execute
- Throws:
Exception- generic exception- See Also:
-
start
- Throws:
Exception- generic exception- See Also:
-
stop
- Throws:
Exception- generic exception- See Also:
-
resume
public void resume()- See Also:
-
suspend
public void suspend()- See Also:
-
reconfigure
public void reconfigure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException - Parameters:
configuration- the configuration- Throws:
org.apache.avalon.framework.configuration.ConfigurationException- if unable to configure- See Also:
-