public interface ComponentLifeCycle
The JBI implementation must track the running state of a component, and
ensure that life cycle state changes are always legal. For example, if
the management interface for controlling a component's life cycle
(ComponentLifeCycleMBean) is used to start
a component that was just installed (and thus in the Shutdown state),
the implementation must invoke this component's
init(ComponentContext) method before invoking its
start() method.
| Modifier and Type | Method and Description |
|---|---|
ObjectName |
getExtensionMBeanName()
Get the JMX object name for the extension MBean for this component; if
there is none, return
null. |
void |
init(ComponentContext context)
Initialize the component.
|
void |
shutDown()
Shut down the component.
|
void |
start()
Start the component.
|
void |
stop()
Stop the component.
|
ObjectName getExtensionMBeanName()
null.null
if there is no additional MBean.void init(ComponentContext context) throws JBIException
If the component needs to register an additional MBean to extend its life cycle, or provide other component management tasks, it should be registered during this call.
context - the component's context, providing access to component
data provided by the JBI environment; must be non-null.JBIException - if the component is unable to initialize.void shutDown()
throws JBIException
init(ComponentContext) must be called before the component can
be started again with a call to start().JBIException - if the component is unable to shut down.void start()
throws JBIException
init(ComponentContext), both when
the component is being started for the first time and when the component
is being restarted after a previous call to shutDown().
If stop() was called previously but shutDown() was not,
start() can be called again without another call to
init(ComponentContext).JBIException - if the component is unable to start.void stop()
throws JBIException
start() may be called
again without first calling init(ComponentContext).JBIException - if the component is unable to stop.Copyright © 2011-2016 OpenESB Community. All Rights Reserved.