ContextReadyEvent class

Event published when the ApplicationContext is ready.

This typically occurs when the context is ready to be used. For example, in a long-running application, the context might be ready to be used.

Listeners may use this event to perform cleanup, stop background processes, or safely pause services that should not run during the ready state.


Example:

class ReadyLogger implements ApplicationListener<ContextReadyEvent> {
  @override
  void onApplicationEvent(ContextReadyEvent event) {
    print("Application context ready: ${event.getSource()}");
  }
}

The context can later be restarted by triggering a refresh or start event.

Inheritance

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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