Package com.vaadin.flow.router.internal
Class RouteRegistryHotswapper
java.lang.Object
com.vaadin.flow.router.internal.RouteRegistryHotswapper
- All Implemented Interfaces:
VaadinHotswapper
A component that reacts on class changes to update route registries.
This class is meant to be used in combination wit Flow
Hotswapper to immediately update routes
registries when classes have been added or modified.
For internal use only. May be renamed or removed in a future release.
- Since:
- 24.5
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanonClassLoadEvent(VaadinService vaadinService, Set<Class<?>> classes, boolean redefined) Updates both application registry, to reflect provided class changes.booleanonClassLoadEvent(VaadinSession session, Set<Class<?>> classes, boolean redefined) Called by Vaadin hotswap entry point when one or more application classes have been updated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.hotswap.VaadinHotswapper
onHotswapComplete
-
Constructor Details
-
RouteRegistryHotswapper
public RouteRegistryHotswapper()
-
-
Method Details
-
onClassLoadEvent
public boolean onClassLoadEvent(VaadinService vaadinService, Set<Class<?>> classes, boolean redefined) Updates both application registry, to reflect provided class changes.
For modified route classes, the following changes are taken into account:Routeannotation removed: the previous route is removed from the registryRoute.value()modified
- Specified by:
onClassLoadEventin interfaceVaadinHotswapper- 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
Description copied from interface:VaadinHotswapperCalled by Vaadin hotswap entry point when one or more application classes have been updated.
This method is meant to perform updates atVaadinSessionlevel. Operation targeting the entire application should be implemented inVaadinHotswapper.onClassLoadEvent(VaadinService, Set, boolean)method.- Specified by:
onClassLoadEventin interfaceVaadinHotswapper- Parameters:
session- 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:
-