Interface: IApplication
Represents a bootstrapped Aurora application instance, exposing methods to start, retrieve dependencies, and gracefully shut down.
Methods
close()
close():
Promise<void>
Performs a graceful shutdown of the application by invoking all OnApplicationShutdown lifecycle hooks on controllers.
Returns
Promise<void>
A promise that resolves once shutdown is complete.
get()
get<
T>(token):Promise<T>
Retrieves an existing provider or controller instance from the root module’s DI context.
Type Parameters
T
T = Token
The expected type of the resolved instance.
Parameters
token
Token<T>
The injection token or class constructor of the provider to resolve.
Returns
Promise<T>
A promise that resolves to the instance associated with the given token.
Throws
If no provider is registered for the given token.
start()
start():
Promise<void>
Attaches all controller event handlers to the platform driver and starts listening for incoming events. Call this after initializing the application to begin processing events.
Returns
Promise<void>
A promise that resolves once the application has started.