org.apache.avalon.framework.container
Class ContainerUtil
java.lang.Objectorg.apache.avalon.framework.container.ContainerUtil
public final class ContainerUtil
extends java.lang.Object
Utility class that makes it easier to transfer
a component throught it's lifecycle stages.
CVS $Revision: 1.16 $ $Date: 2004/02/11 14:34:26 $static void | compose(Object object, ComponentManager componentManager)- compose() is no longer the preferred method via
which components will be supplied with Components.
|
static void | configure(Object object, Configuration configuration)- Configure specified object if it implements the
Configurable interface.
|
static void | contextualize(Object object, Context context)- Supply specified object with a Context object if it implements the
Contextualizable interface.
|
static void | dispose(Object object)- Dispose specified object if it implements the
Disposable interface.
|
static void | enableLogging(Object object, Logger logger)- Supply specified object with Logger if it implements the
LogEnabled interface.
|
static void | execute(Object object)- Execute the specified object if it implements the
Executable interface.
|
static void | initialize(Object object)- Initialize specified object if it implements the
Initializable interface.
|
static void | parameterize(Object object, Parameters parameters)- Parameterize specified object if it implements the
Parameterizable interface.
|
static void | service(Object object, ServiceManager serviceManager)- Supply specified object with ServiceManager if it implements the
Serviceable interface.
|
static void | shutdown(Object object)- Run specified object through shutdown lifecycle stages
(Stop and Dispose).
|
static void | start(Object object)- Start specified object if it implements the
Startable interface.
|
static void | stop(Object object)- Stop specified object if it implements the
Startable interface.
|
compose
public static void compose(Object object,
ComponentManager componentManager)
throws ComponentExceptioncompose() is no longer the preferred method via
which components will be supplied with Components. Please
Use service() from Composable instead.
Supply specified object with ComponentManager if it implements the
Composable interface.
object - the object to composecomponentManager - the ComponentManager object to use for object.
May be null in which case the specified object must not
implement Composable.
configure
public static void configure(Object object,
Configuration configuration)
throws ConfigurationException Configure specified object if it implements the
Configurable interface.
object - the object to Startconfiguration - the configuration object to use during
configuration. May be null in which case the specified object
must not implement Configurable
contextualize
public static void contextualize(Object object,
Context context)
throws ContextException Supply specified object with a Context object if it implements the
Contextualizable interface.
object - the object to contextualizecontext - the context object to use for object.
May be null in which case the specified object must not
implement Contextualizable.
dispose
public static void dispose(Object object)
Dispose specified object if it implements the
Disposable interface.
object - the object to dispose
enableLogging
public static void enableLogging(Object object,
Logger logger) Supply specified object with Logger if it implements the
LogEnabled interface.
object - the object to Startlogger - the logger to enable component with. May be null
in which case the specified object must not implement LogEnabled.
execute
public static void execute(Object object)
throws Exception Execute the specified object if it implements the
Executable interface.
object - the object to execute
initialize
public static void initialize(Object object)
throws Exception Initialize specified object if it implements the
Initializable interface.
object - the object to Initialize
parameterize
public static void parameterize(Object object,
Parameters parameters)
throws ParameterException Parameterize specified object if it implements the
Parameterizable interface.
object - the object to Parameterize.parameters - the parameters object to use during Parameterization.
May be null in which case the specified object must not
implement Parameterizable.
service
public static void service(Object object,
ServiceManager serviceManager)
throws ServiceException Supply specified object with ServiceManager if it implements the
Serviceable interface.
object - the object to serviceserviceManager - the serviceManager object to use for object.
May be null in which case the specified object must not
implement Serviceable.
shutdown
public static void shutdown(Object object)
throws Exception Run specified object through shutdown lifecycle stages
(Stop and Dispose).
object - the object to shutdown
start
public static void start(Object object)
throws Exception Start specified object if it implements the
Startable interface.
object - the object to Start
stop
public static void stop(Object object)
throws Exception Stop specified object if it implements the
Startable interface.
object - the object to stop