ContextPausedEvent class
Published after pause() (or pauseAsync()) was called on a context:
the pauseable lifecycle beans are stopped, for example while a Flutter
app is in the background.
It is a ContextStoppedEvent, so stop listeners see it too. New in Spring 7.
context.addListener<ContextPausedEvent>((_) => log.info('paused'));
context.pause();
Spring (Java):
@EventListener
void onPause(ContextPausedEvent event) { ... }
- Inheritance
-
- Object
- ApplicationEvent
- ApplicationContextEvent
- ContextStoppedEvent
- ContextPausedEvent
Constructors
- ContextPausedEvent(ApplicationContext source)
-
Creates the event for the context
source; contexts do this.
Properties
- applicationContext → ApplicationContext
-
The context that raised the event (the same object as
source, typed).no setterinherited - eventName → String
-
The event's name in logs and in the debug timeline: its class's name
by default. A release build shortens class names (
minified:Class12), so an event that should be recognised there names itself, as the framework's do:no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → Object
-
The object that raised the event, usually the publishing bean (or
the context, for the context's own events).
finalinherited
- timestamp → DateTime
-
When the event was created (not when a listener receives it).
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited