public final class ContainerUtil
extends java.lang.Object
| Modifier | Constructor | Description |
|---|---|---|
private |
ContainerUtil() |
Private constructor to block instantiation.
|
| Modifier and Type | Method | Description |
|---|---|---|
static void |
compose(java.lang.Object object,
org.apache.avalon.framework.component.ComponentManager componentManager) |
Deprecated.
compose() is no longer the preferred method via
which components will be supplied with Components. Please
Use service() from Composable instead.
|
static void |
configure(java.lang.Object object,
org.apache.avalon.framework.configuration.Configuration configuration) |
Configure specified object if it implements the
Configurable interface. |
static void |
contextualize(java.lang.Object object,
org.apache.avalon.framework.context.Context context) |
Supply specified object with a Context object if it implements the
Contextualizable interface. |
static void |
dispose(java.lang.Object object) |
Dispose specified object if it implements the
Disposable interface. |
static void |
enableLogging(java.lang.Object object,
org.apache.avalon.framework.logger.Logger logger) |
Supply specified object with Logger if it implements the
LogEnabled interface. |
static void |
execute(java.lang.Object object) |
Execute the specified object if it implements the
Executable interface. |
static void |
initialize(java.lang.Object object) |
Initialize specified object if it implements the
Initializable interface. |
static void |
parameterize(java.lang.Object object,
org.apache.avalon.framework.parameters.Parameters parameters) |
Parameterize specified object if it implements the
Parameterizable interface. |
static void |
service(java.lang.Object object,
org.apache.avalon.framework.service.ServiceManager serviceManager) |
Supply specified object with ServiceManager if it implements the
Serviceable interface. |
static void |
shutdown(java.lang.Object object) |
Run specified object through shutdown lifecycle stages
(Stop and Dispose).
|
static void |
start(java.lang.Object object) |
Start specified object if it implements the
Startable interface. |
static void |
stop(java.lang.Object object) |
Stop specified object if it implements the
Startable interface. |
private ContainerUtil()
public static void shutdown(java.lang.Object object)
throws java.lang.Exception
object - the object to shutdownjava.lang.Exception - if there is a problem stoppping objectpublic static void enableLogging(java.lang.Object object,
org.apache.avalon.framework.logger.Logger logger)
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.java.lang.IllegalArgumentException - if the object is LogEnabled but Logger is nullpublic static void contextualize(java.lang.Object object,
org.apache.avalon.framework.context.Context context)
throws org.apache.avalon.framework.context.ContextException
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.org.apache.avalon.framework.context.ContextException - if there is a problem contextualizing objectjava.lang.IllegalArgumentException - if the object is Contextualizable but
context is nullpublic static void service(java.lang.Object object,
org.apache.avalon.framework.service.ServiceManager serviceManager)
throws org.apache.avalon.framework.service.ServiceException
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.org.apache.avalon.framework.service.ServiceException - if there is a problem servicing objectjava.lang.IllegalArgumentException - if the object is Servicable but
ServiceManager is nullpublic static void compose(java.lang.Object object,
org.apache.avalon.framework.component.ComponentManager componentManager)
throws org.apache.avalon.framework.component.ComponentException
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.org.apache.avalon.framework.component.ComponentException - if there is a problem composing objectjava.lang.IllegalArgumentException - if the object is Composable but
ComponentManager is nullpublic static void configure(java.lang.Object object,
org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
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 Configurableorg.apache.avalon.framework.configuration.ConfigurationException - if there is a problem Configuring object,
or the object is Configurable but Configuration is nulljava.lang.IllegalArgumentException - if the object is Configurable but
Configuration is nullpublic static void parameterize(java.lang.Object object,
org.apache.avalon.framework.parameters.Parameters parameters)
throws org.apache.avalon.framework.parameters.ParameterException
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.org.apache.avalon.framework.parameters.ParameterException - if there is a problem Parameterizing objectjava.lang.IllegalArgumentException - if the object is Parameterizable but
parameters is nullpublic static void initialize(java.lang.Object object)
throws java.lang.Exception
Initializable interface.object - the object to Initializejava.lang.Exception - if there is a problem Initializing objectpublic static void start(java.lang.Object object)
throws java.lang.Exception
Startable interface.object - the object to Startjava.lang.Exception - if there is a problem Starting objectpublic static void execute(java.lang.Object object)
throws java.lang.Exception
Executable interface.object - the object to executejava.lang.Exception - if there is a problem executing objectpublic static void stop(java.lang.Object object)
throws java.lang.Exception
Startable interface.object - the object to stopjava.lang.Exception - if there is a problem stoppping objectpublic static void dispose(java.lang.Object object)
Disposable interface.object - the object to dispose