Interface VaadinHotswapper
- All Known Implementing Classes:
ReflectionCacheHotswapper,RouteRegistryHotswapper
Listener instances are by default discovered using Flow
Lookup mechanisms. Implementors are usually
discovered and instantiated using ServiceLoader, meaning
that all implementations must have a zero-argument constructor and the fully
qualified name of the implementation class must be listed on a separate line
in a META-INF/services/com.vaadin.flow.hotswap.VaadinHotSwapper file present
in the jar file containing the implementation class. Integrations for
specific runtime environments, such as Spring and CDI, might also provide
other ways of discovering implementors.
For internal use only. May be renamed or removed in a future release.
- Since:
- 24.5
- Author:
- Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanonClassLoadEvent(VaadinService vaadinService, Set<Class<?>> classes, boolean redefined) Called by Vaadin hotswap entry point when one or more application classes have been updated.default booleanonClassLoadEvent(VaadinSession vaadinSession, Set<Class<?>> classes, boolean redefined) Called by Vaadin hotswap entry point when one or more application classes have been updated.default voidCalled by Vaadin hotswap entry point after all hotswap related operations have been completed.
-
Method Details
-
onClassLoadEvent
default boolean onClassLoadEvent(VaadinService vaadinService, Set<Class<?>> classes, boolean redefined) Called by Vaadin hotswap entry point when one or more application classes have been updated.This method is meant to perform application-wide updates. Operation targeting Vaadin session should be implemented in
onClassLoadEvent(VaadinSession, Set, boolean)method.- Parameters:
vaadinService- activeVaadinServiceinstance.classes- the set of changed classes.redefined- true if the classes have been redefined by hotswap mechanism, false if they have been loaded for the first time by the ClassLoader.- Returns:
- true if a browser page reload is required, false otherwise.
- See Also:
-
onClassLoadEvent
default boolean onClassLoadEvent(VaadinSession vaadinSession, Set<Class<?>> classes, boolean redefined) Called by Vaadin hotswap entry point when one or more application classes have been updated.This method is meant to perform updates at
VaadinSessionlevel. Operation targeting the entire application should be implemented inonClassLoadEvent(VaadinService, Set, boolean)method.- Parameters:
vaadinSession- theVaadinSessionto be potentially updated.classes- the set of changed classes.redefined- true if the classes have been redefined by hotswap mechanism, false if they have been loaded for the first time by the ClassLoader.- Returns:
- true if a browser page reload is required, false otherwise.
- See Also:
-
onHotswapComplete
Called by Vaadin hotswap entry point after all hotswap related operations have been completed.- Parameters:
event- an event containing information about the hotswap operation.
-