org.apache.fulcrum.yaafi.framework.component
Class AvalonServiceComponentImpl
java.lang.Object
org.apache.fulcrum.yaafi.framework.component.ServiceComponentImpl
org.apache.fulcrum.yaafi.framework.component.AvalonServiceComponentImpl
- All Implemented Interfaces:
- ServiceComponent, ServiceComponentLifecycle
public class AvalonServiceComponentImpl
- extends ServiceComponentImpl
This class implements a service component singleton with
an arbitray lifecycle.
- Author:
- Siegfried Goeschl
Constructor Summary |
AvalonServiceComponentImpl(RoleEntry roleEntry,
org.apache.avalon.framework.logger.Logger parentLogger,
org.apache.avalon.framework.logger.Logger logger,
ReadWriteLock readWriteLock)
Constructor to parse the configuration. |
Method Summary |
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
|
void |
contextualize(org.apache.avalon.framework.context.Context context)
|
void |
decommision()
Stop and dispose the service implementation. |
void |
enableLogging(org.apache.avalon.framework.logger.Logger logger)
|
void |
execute()
|
protected void |
incarnateInstance()
|
void |
initialize()
|
void |
parameterize(org.apache.avalon.framework.parameters.Parameters parameters)
|
void |
reconfigure()
Reconfigures a service component instance |
void |
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, getReadWriteLock, getRoleEntry, getServiceManager, getShorthand, incarnate, isEarlyInit, isInstantiated, loadImplemtationClass, setConfiguration, setContext, setLogger, setParameters, setProxyInstance, setServiceManager, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AvalonServiceComponentImpl
public AvalonServiceComponentImpl(RoleEntry roleEntry,
org.apache.avalon.framework.logger.Logger parentLogger,
org.apache.avalon.framework.logger.Logger logger,
ReadWriteLock readWriteLock)
- 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 instancereadWriteLock
- the read/write lock to synchronize access to services
incarnateInstance
protected void incarnateInstance()
throws java.lang.Exception
- Specified by:
incarnateInstance
in class ServiceComponentImpl
- Throws:
java.lang.Exception
- See Also:
ServiceComponentLifecycle.incarnate()
reconfigure
public void reconfigure()
throws java.lang.Exception
- Description copied from interface:
ServiceComponentLifecycle
- Reconfigures a service component instance
- Specified by:
reconfigure
in interface ServiceComponentLifecycle
- Specified by:
reconfigure
in class ServiceComponentImpl
- Throws:
java.lang.Exception
- the operation failed- See Also:
ServiceComponentLifecycle.reconfigure()
decommision
public void decommision()
throws java.lang.Exception
- Stop and dispose the service implementation.
- Specified by:
decommision
in interface ServiceComponentLifecycle
- Overrides:
decommision
in class ServiceComponentImpl
- Throws:
java.lang.Exception
- the operation failed- See Also:
ServiceComponentLifecycle.decommision()
enableLogging
public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
- See Also:
LogEnabled.enableLogging(org.apache.avalon.framework.logger.Logger)
contextualize
public void contextualize(org.apache.avalon.framework.context.Context context)
throws org.apache.avalon.framework.context.ContextException
- Throws:
org.apache.avalon.framework.context.ContextException
- See Also:
Contextualizable.contextualize(org.apache.avalon.framework.context.Context)
service
public void service(org.apache.avalon.framework.service.ServiceManager serviceManager)
throws org.apache.avalon.framework.service.ServiceException
- Throws:
org.apache.avalon.framework.service.ServiceException
- See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)
configure
public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
- See Also:
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)
parameterize
public void parameterize(org.apache.avalon.framework.parameters.Parameters parameters)
throws org.apache.avalon.framework.parameters.ParameterException
- Throws:
org.apache.avalon.framework.parameters.ParameterException
- See Also:
Parameterizable.parameterize(org.apache.avalon.framework.parameters.Parameters)
initialize
public void initialize()
throws java.lang.Exception
- Throws:
java.lang.Exception
- See Also:
Initializable.initialize()
execute
public void execute()
throws java.lang.Exception
- Throws:
java.lang.Exception
- See Also:
Executable.execute()
start
public void start()
throws java.lang.Exception
- Throws:
java.lang.Exception
- See Also:
Startable.start()
stop
public void stop()
throws java.lang.Exception
- Throws:
java.lang.Exception
- See Also:
Startable.stop()
resume
public void resume()
- See Also:
Suspendable.resume()
suspend
public void suspend()
- See Also:
Suspendable.suspend()
reconfigure
public void reconfigure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
- See Also:
Reconfigurable.reconfigure(org.apache.avalon.framework.configuration.Configuration)
Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.