StartupEvent class

An application–level event signaling that the JetLeaf application has completed its startup sequence.

A StartupEvent is published during the container bootstrapping phase and provides a reference to the associated StartupTracker, which contains timing, diagnostics, and metadata about the startup process.

This event is dispatched through the application's event bus and may be listened to by components that need to perform actions after the system has fully initialized (e.g., warm-up routines, analytics reporting, cache preparation, background task scheduling).

Event Characteristics

  • Event Source: The originating ApplicationContext
  • Timestamp: Provided by the inherited event clock
  • Tracker: A StartupTracker instance describing startup metrics

Publication

Use the static publish method to dispatch a new StartupEvent to the application event bus.

Example

await StartupEvent.publish(context, tracker);
Inheritance

Constructors

StartupEvent(ApplicationContext source, StartupTracker tracker)
Creates a new StartupEvent using the provided event source and associated tracker.
StartupEvent.withClock(ApplicationContext source, DateTime clock(), StartupTracker tracker)
Creates a new StartupEvent while explicitly supplying a custom event clock function. This is typically used when deterministic timestamps are required (e.g., during testing).

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tracker → StartupTracker
The tracker containing metrics and diagnostic information about the application's startup lifecycle.
final

Methods

equalizedProperties() List<Object?>
Mixin-style contract for value-based equality, hashCode, and toString.
inherited
getApplicationContext() ApplicationContext
Returns the ApplicationContext that triggered this event.
inherited
getPackageName() String
Represents an abstraction for identifying the package that an object, resource, or service belongs to.
getSource() ApplicationContext
Returns the ApplicationContext that published this event.
inherited
getTimestamp() DateTime
Returns the timestamp of the event.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
toStringOptions() → ToStringOptions
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

publish(ConfigurableApplicationContext context, StartupTracker tracker) Future<void>
Publishes a StartupEvent into the given ConfigurableApplicationContext.