
public interface HasLifecycle
| Modifier and Type | Method and Description |
|---|---|
default void |
init()
Called from the enclosing
Subsystem at construction
phase. |
default void |
postInit()
Called from the enclosing
Subsystem at construction
phase. |
default void |
postShutdown()
Called from the enclosing
Subsystem when
Agent.shutdown() has been called after shtudownNow has
been invoked on all the children. |
default void |
postStart()
Called from the enclosing
Subsystem after
HardwareController components have been handled. |
default void |
shutdownNow()
Called from the enclosing
Subsystem when
Agent.shutdown() has been called. |
default void |
start()
Called from the enclosing
Subsystem when
Subsystem.start() has been called. |
default void init()
Subsystem at construction
phase. This method is called before the children components of this
object have their init method called.
At the time it is called, connection to the messaging layer is not yet
done, so there should be no attempt to send messages in the body of
this method. Configuration for message listening can nevertheless be
done here, such as adding MessageListener
objects.
It is unnecessary to call super.init()
default void postInit()
Subsystem at construction
phase. This method is called after init and postInit have
been called on this component's children.default void start()
Subsystem when
Subsystem.start() has been called. At the time it is
called :
PhaseState is
INITIALIZING
connection with the messaging layer is effective, the enclosing
subsystem has started StatusHeartBeat
publication
the startup configuration has been loaded (if provided)
super.start()default void postStart()
throws HardwareException
Subsystem after
HardwareController components have been handled. At the time it
is called :
HardwareController components have been handled without
throwing HardwareException
If successful, the enclosing subsystem's
PhaseState will change to
OPERATIONAL and the subsystem will invoke
startTicking on its modules components.
If an HardwareException is thrown, the
OperationalState will change to
ENGINEERING_FAULT until a call to
completeInitialization
is successful
It is unnecessary to call super.postStart()
TO-DO: Does this really need to throw a HardwareException? Don't we have
other Hardware specific interfaces?
HardwareException - if any failure interacting with the hardware
occurs.default void shutdownNow()
Subsystem when
Agent.shutdown() has been called. At the time it
is called :
PhaseState is CLOSING.
HardwareController.checkStopped() has
been called
If overridden from Module, a call to
super.shutdownNow() is required.
default void postShutdown()
Subsystem when
Agent.shutdown() has been called after shtudownNow has
been invoked on all the children. At the time it
is called :
PhaseState is CLOSING.
HardwareController.checkStopped() has
been called
If overridden from Module, a call to
super.shutdownNow() is required.
Copyright © 2017 LSST. All rights reserved.