
public interface HasLifecycle
| Modifier and Type | Method and Description |
|---|---|
default void |
init()
Called from the enclosing
Subsystem at
initialization phase. |
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
Agent.start() has been called. |
default void init()
Subsystem at
initialization phase. 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 start()
Subsystem when
Agent.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.
Copyright © 2016 LSST. All rights reserved.