org.apache.fulcrum.yaafi.framework.component
Class AvalonServiceComponentImpl

java.lang.Object
  extended by org.apache.fulcrum.yaafi.framework.component.ServiceComponentImpl
      extended by 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)
          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, 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
 

Constructor Detail

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 file
parentLogger - the logger of the service container
logger - The logger for the service instance
Method Detail

incarnateInstance

protected void incarnateInstance()
                          throws Exception
Specified by:
incarnateInstance in class ServiceComponentImpl
Throws:
Exception
See Also:
ServiceComponentLifecycle.incarnate()

reconfigure

public void reconfigure()
                 throws Exception
Description copied from interface: ServiceComponentLifecycle
Reconfigures a service component instance

Specified by:
reconfigure in interface ServiceComponentLifecycle
Specified by:
reconfigure in class ServiceComponentImpl
Throws:
Exception - the operation failed
See Also:
ServiceComponentLifecycle.reconfigure()

decommision

public void decommision()
                 throws Exception
Stop and dispose the service implementation.

Specified by:
decommision in interface ServiceComponentLifecycle
Overrides:
decommision in class ServiceComponentImpl
Throws:
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 Exception
Throws:
Exception
See Also:
Initializable.initialize()

execute

public void execute()
             throws Exception
Throws:
Exception
See Also:
Executable.execute()

start

public void start()
           throws Exception
Throws:
Exception
See Also:
Startable.start()

stop

public void stop()
          throws Exception
Throws:
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 © 2004-2012 The Apache Software Foundation. All Rights Reserved.