ContextStartedEvent class
Event published when the ApplicationContext is started or restarted.
This event indicates that the context is now active and ready to process requests, initialize pods, or resume tasks that may have been paused or stopped.
It is typically used after a call to start()
or when a previously stopped
context is reactivated.
Example:
class StartupLogger implements ApplicationListener<ContextStartedEvent> {
@override
void onApplicationEvent(ContextStartedEvent event) {
print("Application context started: ${event.getSource()}");
}
}
- Inheritance
-
- Object
- EventObject
- ApplicationEvent
- ApplicationContextEvent
- ContextStartedEvent
Constructors
- ContextStartedEvent(ApplicationContext source)
- Event published when the ApplicationContext is started or restarted.
- ContextStartedEvent.withClock(ApplicationContext source, DateTime clock())
- Event published when the ApplicationContext is started or restarted.
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
, andtoString
.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