|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface must be implemented by a JBI component to provide initialization, start, stop, and shutdown life cycle processing. These methods comprise the life cycle contract between the JBI implementation and the component. The life cycle of a component begins with a call to the init() method on an instance of the component's implementation of this interface, and ends with the first call to the shutDown() method on that instance. Between these two calls, there can be any number of stop() and start() calls.
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.
Method Summary | |
javax.management.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. |
Method Detail |
public javax.management.ObjectName getExtensionMBeanName()
null
.
null
if there is no additional MBean.public 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.public 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.public 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.public void stop() throws JBIException
start()
may be called
again without first calling init(ComponentContext)
.
JBIException
- if the component is unable to stop.
|
Built 06/07/2005 11:16 AM on acer (SunOS 5.9) | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |