ContextRestartedEvent class
Event published when the ApplicationContext is restarted.
This event is typically fired when the context is stopped and then started again, signaling a full lifecycle reset rather than just a refresh.
It can be useful for components that need to release and reacquire resources, reinitialize internal state, or log restart-specific metadata.
Example:
class RestartMonitor implements ApplicationListener<ContextRestartedEvent> {
@override
void onApplicationEvent(ContextRestartedEvent event) {
print("Application context restarted: ${event.getSource()}");
}
}
- Inheritance
-
- Object
- EventObject
- ApplicationEvent
- ApplicationContextEvent
- ContextRestartedEvent
Constructors
- ContextRestartedEvent(ApplicationContext source)
- Event published when the ApplicationContext is restarted.
- ContextRestartedEvent.withClock(ApplicationContext source, DateTime clock())
- Event published when the ApplicationContext is 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