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 TypeMethodDescriptionboolean
onClassLoadEvent
(VaadinService vaadinService, Set<Class<?>> classes, boolean redefined) Updates both application registry, to reflect provided class changes.boolean
onClassLoadEvent
(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, wait
Methods 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.Route
annotation removed: the previous route is removed from the registryRoute.value()
modified
- Specified by:
onClassLoadEvent
in interfaceVaadinHotswapper
- Parameters:
vaadinService
- activeVaadinService
instance.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:VaadinHotswapper
Called by Vaadin hotswap entry point when one or more application classes have been updated.VaadinSession
level. Operation targeting the entire application should be implemented inVaadinHotswapper.onClassLoadEvent(VaadinService, Set, boolean)
method.- Specified by:
onClassLoadEvent
in interfaceVaadinHotswapper
- Parameters:
session
- theVaadinSession
to 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:
-