ReadonlyacceptingWhether new operations may start. True only while running.
ReadonlynameApplication name.
ReadonlyregistrationFramework-owned registrations still held. Activation-rollback gates read this.
ReadonlyresourceFramework-owned resources still held.
ReadonlystateCurrent lifecycle state.
Closes ingress synchronously: disposes registrations and aborts the root
signal. Safe to call from a synchronous dispose() — it never throws and
never starts async cleanup. The first stop reason wins.
What the Host still owns, for leak reports and shutdown diagnostics.
Starts the application. Single-flight: concurrent calls share one promise. Rejects with the original activation error after rollback completes. A Host is single-use and cannot start again after stopping or failing.
Runs the full stop pipeline exactly once. Idempotent: repeated calls share
one promise. Never rejects, so deactivate() cannot fail the host; cleanup
failures are reported through diagnostics. When the budget expires, it may
settle while non-cooperative asynchronous work is still pending.
The single owner of an extension's lifecycle.
There is exactly one asynchronous cleanup path:
stop(). The Extension Context owns only a synchronous failsafe that callsbeginStop(); framework registrations remain in the Host's own RegistrationScope so an external subscription disposal cannot tear down half of the pipeline independently.Do not assume an ordering between the failsafe and
deactivate(). Both may request shutdown, and correctness comes frombeginStop()andstop()being state-guarded, idempotent and single-flight.Example