org.apache.fulcrum.yaafi.framework.container
Interface ServiceLifecycleManager

All Known Subinterfaces:
ServiceContainer
All Known Implementing Classes:
ServiceContainerImpl

public interface ServiceLifecycleManager

Interface for managing the lifecycle of services. It provides methods to get

Author:
Siegfried Goeschl

Method Summary
 void decommision(java.lang.String name)
          Decommision the given service by calling Startable.stop() and Disposable.dispose().
 RoleEntry[] getRoleEntries()
          Get a list of all RoleEntries.
 RoleEntry getRoleEntry(java.lang.String name)
          Get a RoleEntryImpl for a given service
 void reconfigure(java.lang.String[] names)
          Reconfigures a set of services by calling Suspendable.suspend(), Reconfigurable.reconfigure() and Suspendable.resume().
 

Method Detail

getRoleEntry

RoleEntry getRoleEntry(java.lang.String name)
                       throws org.apache.avalon.framework.service.ServiceException
Get a RoleEntryImpl for a given service

Parameters:
name - the name of the service component
Returns:
the RoleEntryImpl
Throws:
org.apache.avalon.framework.service.ServiceException - the service was not found

getRoleEntries

RoleEntry[] getRoleEntries()
Get a list of all RoleEntries.

Returns:
a list of RoleEntries

reconfigure

void reconfigure(java.lang.String[] names)
                 throws org.apache.avalon.framework.service.ServiceException,
                        org.apache.avalon.framework.configuration.ConfigurationException
Reconfigures a set of services by calling Suspendable.suspend(), Reconfigurable.reconfigure() and Suspendable.resume().

Parameters:
names - the set of services to be reconfigured
Throws:
org.apache.avalon.framework.service.ServiceException - one of the service was not found
org.apache.avalon.framework.configuration.ConfigurationException - the reconfiguration failed

decommision

void decommision(java.lang.String name)
                 throws org.apache.avalon.framework.service.ServiceException
Decommision the given service by calling Startable.stop() and Disposable.dispose(). The state of the service component is the same as using lazy initialization. Therefore a new service instance will be created if the service is reused again. If you are keeping an instance of the service you are out of luck.

Parameters:
name - the name of the service
Throws:
org.apache.avalon.framework.service.ServiceException - the service was not found


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.