Hi everyone! Just going to give a recap on the last backend sharing session.
We are going to move from the previous Startable
/ Shutdownable
system to the new Lifecycle
system for classes that need a setup / teardown code when the app starts / shuts down. We are planning to remove Startable
and Shutdownable
in the future.
start()
/shutdown()
code only passes down the call to the components below it.
Lifecycle
and LifecycleManager
simplifies this. Lifecycle
objects registers itself to the LifecycleManager
when they are constructed, and LifecycleManager.start()
will start all Lifecycle
objects when the app is started.
Lifecycle
LifecycleManager.registerLifecycle(this)
to the end of each constructor
onStart()
and onShutdown()
methods
Lifecycle
LifecycleManager.registerLifecycle(this)
to the end of each constructor
start()
method to onStart()
and the shutdown()
method into onShutdown()
start()
and shutdown()
methods
For more information about the technical details and reasoning, please refer to the references below.
Lifecycle - https://29022131.atlassian.net/wiki/display/BEI/Lifecycle
Migrating from Startable / Shutdownable to Lifecycle -
https://29022131.atlassian.net/wiki/pages/viewpage.action?pageId=191585673 (