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 TypeMethodDescriptionvoid
configure
(org.apache.avalon.framework.configuration.Configuration configuration) void
contextualize
(org.apache.avalon.framework.context.Context context) void
Decommisions a service component instance.void
enableLogging
(org.apache.avalon.framework.logger.Logger logger) void
execute()
protected void
void
void
parameterize
(org.apache.avalon.framework.parameters.Parameters parameters) void
Reconfigures a service component instancevoid
reconfigure
(org.apache.avalon.framework.configuration.Configuration configuration) void
resume()
void
service
(org.apache.avalon.framework.service.ServiceManager serviceManager) void
start()
void
stop()
void
suspend()
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:
incarnateInstance
in classServiceComponentImpl
- Throws:
Exception
- generic exception- See Also:
-
reconfigure
Description copied from interface:ServiceComponentLifecycle
Reconfigures a service component instance- Specified by:
reconfigure
in interfaceServiceComponentLifecycle
- Specified by:
reconfigure
in classServiceComponentImpl
- Throws:
Exception
- the operation failed
-
decommision
Description copied from interface:ServiceComponentLifecycle
Decommisions a service component instance.- Specified by:
decommision
in interfaceServiceComponentLifecycle
- Overrides:
decommision
in 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:
-