Class ReactJSSourcesChangedEvent
java.lang.Object
java.util.EventObject
io.micronaut.context.event.ApplicationEvent
io.micronaut.views.react.ReactJSSourcesChangedEvent
- All Implemented Interfaces:
Serializable
public final class ReactJSSourcesChangedEvent
extends io.micronaut.context.event.ApplicationEvent
The ReactJS sources changed event.
Published when the server bundle or the render script has been reloaded, after the pool of
GraalJS contexts has been dropped. Public so that a development module can tell the browser to
refresh; micronaut-views-react-dev is the one that does.
- Author:
- Denis Stepanov
- See Also:
-
Field Summary
Fields inherited from class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionReactJSSourcesChangedEvent(Object source, long generation) Records the source generation in the event so context providers can invalidate their context-bound module state without assuming that a source change permits closing a context. -
Method Summary
Methods inherited from class EventObject
getSource, toString
-
Constructor Details
-
ReactJSSourcesChangedEvent
Records the source generation in the event so context providers can invalidate their context-bound module state without assuming that a source change permits closing a context.- Parameters:
source- The source manager that detected the changegeneration- The newly active source generation
-
-
Method Details
-
generation
public long generation()- Returns:
- The source generation active after the change
-