enum classafIoc::ServiceLifecycle
sys::Obj sys::Enum afIoc::ServiceLifecycle
@
Serializable { simple=true }
As returned by ServiceDefinition to define the lifecycle state of a service. A service lifecycle looks like:
Defined - the service is defined in a module || \/ Proxied - a proxy has been created and the service may be injected || \/ Created - the implementation has been created and the service is live
The service implementation is created on demand when methods on the proxy are called.
Note that if a service does not have a proxy, the Proxied
stage is skipped.
@since 1.2.0
- builtin
const static ServiceLifecycle builtin := ...
Builtin services are internal IoC services. They exist before the Registry is constructed.
- created
const static ServiceLifecycle created := ...
The service implementation has been created. It lives!
- defined
const static ServiceLifecycle defined := ...
The service is defined in a module, but has not yet been referenced.
- fromStr
static new fromStr(Str name, Bool checked := true)
Return the ServiceLifecycle instance for the specified name. If not a valid name and checked is false return null, otherwise throw ParseErr.
- proxied
const static ServiceLifecycle proxied := ...
A proxy has been created for the service and may be injected into other services. No methods of the proxy have been invoked and the implementation does yet not exist.
- vals
const static ServiceLifecycle[] vals := ...
List of ServiceLifecycle values indexed by ordinal