Lifecycles
Avalon Lifecycle
The Avalon lifecycle follows a well defined order:
- Constructor: The Avalon IoC frameworks do not require you to do much in the constructor
LogEnabled.enableLogging( Logger ): the Logger is passed to the component
Contextualizable.context( Context ): the Context is passed to the component
Serviceable.service( ServiceManager ): the ServiceManager is passed to the component that enables the lookup of the dependencies.
Configurable.configure( Configuration ): the Configuration is passed to the component
Initializable.initialize(): the component is initialized
Startable.start(): the component is started
Loom multi-component management
While the lifecycle of a component is well defined as above, the order in which multi-component lifecycles are managed is specific to the kernel.
Loom goes through the whole lifecycle process to the start phase for each component before proceeding to the next one: