| java.lang.Object org.apache.cocoon.components.LifecycleHelper
LifecycleHelper | public class LifecycleHelper (Code) | | Utility class for setting up Avalon components. Similar to Excalibur's
DefaultComponentFactory , but on existing objects.
author: Sylvain Wallez version: CVS $Id: LifecycleHelper.java 433543 2006-08-22 06:22:54Z crossley $ |
Constructor Summary | |
public | LifecycleHelper(Logger logger, Context context, ComponentManager componentManager, RoleManager roles, Configuration configuration) Construct a new LifecycleHelper that can be used repeatedly to
setup several components. | public | LifecycleHelper(Logger logger, Context context, ServiceManager serviceManager, RoleManager roles, Configuration configuration) Construct a new LifecycleHelper that can be used repeatedly to
setup several components. | public | LifecycleHelper(Logger logger, Context context, ServiceManager serviceManager, Configuration configuration) Construct a new LifecycleHelper that can be used repeatedly to
setup several components. | public | LifecycleHelper(Logger logger, Context context, ServiceManager serviceManager, ComponentManager componentManager, RoleManager roles, Configuration configuration) Construct a new LifecycleHelper that can be used repeatedly to
setup several components. |
Method Summary | |
final public static void | decommission(Object component) Decomission a component, by stopping (if it's Startable ) and
disposing (if it's Disposable ) a component. | final public static void | dispose(Object component) Dispose a component if it's Disposable . | public Object | setupComponent(Object component) Setup a component, including initialization and start.
Parameters: component - the component to setup. | public Object | setupComponent(Object component, boolean initializeAndStart) Setup a component, and optionnaly initializes (if it's Initializable )
and starts it (if it's Startable ).
Parameters: component - the component to setup. Parameters: initializeAndStart - if true, intialize() and start() will be called. | public static Object | setupComponent(Object component, Logger logger, Context context, ComponentManager componentManager, RoleManager roles, Configuration configuration) Static equivalent to
LifecycleHelper.setupComponent(Object) , to be used when there's only one
component to setup. | public static Object | setupComponent(Object component, Logger logger, Context context, ServiceManager serviceManager, RoleManager roles, Configuration configuration) Alternative setupComponent method that takes a ServiceManager instead of a ComponentManger. | public static Object | setupComponent(Object component, Logger logger, Context context, ServiceManager serviceManager, Configuration configuration) Alternative setupComponent method that takes a ServiceManager instead of a ComponentManger. | public static Object | setupComponent(Object component, Logger logger, Context context, ComponentManager componentManager, RoleManager roles, Configuration configuration, boolean initializeAndStart) Static equivalent to
LifecycleHelper.setupComponent(Object,boolean) , to be used when there's only one
component to setup. | public static Object | setupComponent(Object component, Logger logger, Context context, ServiceManager serviceManager, RoleManager roles, Configuration configuration, boolean initializeAndStart) Alternative setupComponent method that takes a ServiceManager instead of a ComponentManger. | public static Object | setupComponent(Object component, Logger logger, Context context, ServiceManager serviceManager, Configuration configuration, boolean initializeAndStart) Alternative setupComponent method that takes a ServiceManager instead of a ComponentManger. | public static Object | setupComponent(Object component, Logger logger, Context context, ServiceManager serviceManager, ComponentManager componentManager, RoleManager roles, Configuration configuration, boolean initializeAndStart) Static equivalent to
LifecycleHelper.setupComponent(Object,boolean) , to be used when there's only one
component to setup. |
LifecycleHelper | public LifecycleHelper(Logger logger, Context context, ComponentManager componentManager, RoleManager roles, Configuration configuration)(Code) | | Construct a new LifecycleHelper that can be used repeatedly to
setup several components.
Note : if a parameter is null ,
the corresponding method isn't called (e.g. if configuration is
null , configure() isn't called).
Parameters: logger - the Logger to pass to LogEnabled s, unless there isa LogKitManager and the configuration specifies a logger name. Parameters: context - the Context to pass to Contexutalizable s. Parameters: componentManager - the component manager to pass to Composable s. Parameters: roles - the RoleManager to pass to DefaultComponentSelector s. Parameters: configuration - the Configuration object to pass to new instances. |
LifecycleHelper | public LifecycleHelper(Logger logger, Context context, ServiceManager serviceManager, RoleManager roles, Configuration configuration)(Code) | | Construct a new LifecycleHelper that can be used repeatedly to
setup several components.
Note : if a parameter is null ,
the corresponding method isn't called (e.g. if configuration is
null , configure() isn't called).
Parameters: logger - the Logger to pass to LogEnabled s, unless there isa LogKitManager and the configuration specifies a logger name. Parameters: context - the Context to pass to Contexutalizable s. Parameters: serviceManager - the service manager to pass to Serviceable s. Parameters: roles - the RoleManager to pass to DefaultComponentSelector s. Parameters: configuration - the Configuration object to pass to new instances. |
LifecycleHelper | public LifecycleHelper(Logger logger, Context context, ServiceManager serviceManager, Configuration configuration)(Code) | | Construct a new LifecycleHelper that can be used repeatedly to
setup several components.
Note : if a parameter is null ,
the corresponding method isn't called (e.g. if configuration is
null , configure() isn't called).
Parameters: logger - the Logger to pass to LogEnabled s, unless there isa LogKitManager and the configuration specifies a logger name. Parameters: context - the Context to pass to Contexutalizable s. Parameters: serviceManager - the service manager to pass to Serviceable s. Parameters: configuration - the Configuration object to pass to new instances. |
LifecycleHelper | public LifecycleHelper(Logger logger, Context context, ServiceManager serviceManager, ComponentManager componentManager, RoleManager roles, Configuration configuration)(Code) | | Construct a new LifecycleHelper that can be used repeatedly to
setup several components.
Note : if a parameter is null ,
the corresponding method isn't called (e.g. if configuration is
null , configure() isn't called).
Parameters: logger - the Logger to pass to LogEnabled s, unless there isa LogKitManager and the configuration specifies a logger name. Parameters: context - the Context to pass to Contexutalizable s. Parameters: serviceManager - the service manager to pass to Serviceable s. Parameters: componentManager - the component manager to pass to Composable s. Parameters: roles - the RoleManager to pass to DefaultComponentSelector s. Parameters: configuration - the Configuration object to pass to new instances. |
decommission | final public static void decommission(Object component) throws Exception(Code) | | Decomission a component, by stopping (if it's Startable ) and
disposing (if it's Disposable ) a component.
|
dispose | final public static void dispose(Object component)(Code) | | Dispose a component if it's Disposable . Otherwhise, do nothing.
|
setupComponent | public Object setupComponent(Object component) throws Exception(Code) | | Setup a component, including initialization and start.
Parameters: component - the component to setup. the component passed in, to allow function chaining. throws: Exception - if something went wrong. |
setupComponent | public Object setupComponent(Object component, boolean initializeAndStart) throws Exception(Code) | | Setup a component, and optionnaly initializes (if it's Initializable )
and starts it (if it's Startable ).
Parameters: component - the component to setup. Parameters: initializeAndStart - if true, intialize() and start() will be called. the component passed in, to allow function chaining. throws: Exception - if something went wrong. |
setupComponent | public static Object setupComponent(Object component, Logger logger, Context context, ServiceManager serviceManager, RoleManager roles, Configuration configuration) throws Exception(Code) | | Alternative setupComponent method that takes a ServiceManager instead of a ComponentManger.
|
setupComponent | public static Object setupComponent(Object component, Logger logger, Context context, ServiceManager serviceManager, Configuration configuration) throws Exception(Code) | | Alternative setupComponent method that takes a ServiceManager instead of a ComponentManger.
|
setupComponent | public static Object setupComponent(Object component, Logger logger, Context context, ServiceManager serviceManager, RoleManager roles, Configuration configuration, boolean initializeAndStart) throws Exception(Code) | | Alternative setupComponent method that takes a ServiceManager instead of a ComponentManger.
|
setupComponent | public static Object setupComponent(Object component, Logger logger, Context context, ServiceManager serviceManager, Configuration configuration, boolean initializeAndStart) throws Exception(Code) | | Alternative setupComponent method that takes a ServiceManager instead of a ComponentManger.
|
setupComponent | public static Object setupComponent(Object component, Logger logger, Context context, ServiceManager serviceManager, ComponentManager componentManager, RoleManager roles, Configuration configuration, boolean initializeAndStart) throws Exception(Code) | | Static equivalent to
LifecycleHelper.setupComponent(Object,boolean) , to be used when there's only one
component to setup.
|
|
|