Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » components » [javadoc | source]
org.apache.cocoon.components
public class: LifecycleHelper [javadoc | source]
java.lang.Object
   org.apache.cocoon.components.LifecycleHelper
Utility class for setting up Avalon components. Similar to Excalibur's DefaultComponentFactory, but on existing objects.

Constructor:
 public LifecycleHelper(Logger logger,
    Context context,
    ServiceManager serviceManager,
    Configuration configuration) 
    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 LogEnableds, unless there is a LogKitManager and the configuration specifies a logger name.
    context - the Context to pass to Contexutalizables.
    serviceManager - the service manager to pass to Serviceables.
    configuration - the Configuration object to pass to new instances.
 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.

    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 LogEnableds, unless there is a LogKitManager and the configuration specifies a logger name.
    context - the Context to pass to Contexutalizables.
    componentManager - the component manager to pass to Composables.
    roles - the RoleManager to pass to DefaultComponentSelectors.
    configuration - the Configuration object to pass to new instances.
 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.

    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 LogEnableds, unless there is a LogKitManager and the configuration specifies a logger name.
    context - the Context to pass to Contexutalizables.
    serviceManager - the service manager to pass to Serviceables.
    roles - the RoleManager to pass to DefaultComponentSelectors.
    configuration - the Configuration object to pass to new instances.
 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.

    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 LogEnableds, unless there is a LogKitManager and the configuration specifies a logger name.
    context - the Context to pass to Contexutalizables.
    serviceManager - the service manager to pass to Serviceables.
    componentManager - the component manager to pass to Composables.
    roles - the RoleManager to pass to DefaultComponentSelectors.
    configuration - the Configuration object to pass to new instances.
Method from org.apache.cocoon.components.LifecycleHelper Summary:
decommission,   dispose,   setupComponent,   setupComponent,   setupComponent,   setupComponent,   setupComponent,   setupComponent,   setupComponent,   setupComponent,   setupComponent
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.components.LifecycleHelper Detail:
 public static final  void decommission(Object component) throws Exception 
    Decomission a component, by stopping (if it's Startable) and disposing (if it's Disposable) a component.
 public static final  void dispose(Object component) 
    Dispose a component if it's Disposable. Otherwhise, do nothing.
 public Object setupComponent(Object component) throws Exception 
    Setup a component, including initialization and start.
 public Object setupComponent(Object component,
    boolean initializeAndStart) throws Exception 
    Setup a component, and optionnaly initializes (if it's Initializable) and starts it (if it's Startable).
 public static Object setupComponent(Object component,
    Logger logger,
    Context context,
    ServiceManager serviceManager,
    Configuration configuration) throws Exception 
    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) throws Exception 
Deprecated! ComponentManager - and RoleManager are deprecated

 public static Object setupComponent(Object component,
    Logger logger,
    Context context,
    ServiceManager serviceManager,
    RoleManager roles,
    Configuration configuration) throws Exception 
Deprecated! RoleManager - is deprecated

    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) throws Exception 
    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) throws Exception 
Deprecated! ComponentManager - and RoleManager are deprecated

 public static Object setupComponent(Object component,
    Logger logger,
    Context context,
    ServiceManager serviceManager,
    RoleManager roles,
    Configuration configuration,
    boolean initializeAndStart) throws Exception 
Deprecated! RoleManager - is deprecated

    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) throws Exception 
Deprecated! ComponentManager - and RoleManager are deprecated