Package com.vaadin.flow.router
Annotation Interface ListenerPriority
This annotation sets the priority of execution on
BeforeEnterListeners, BeforeLeaveListeners and
AfterNavigationListeners. Listeners will be sorted by their
respective priority value in a descending order before they are executed.
Listeners that are not annotated with @ListenerPriority have a
default priority of zero.
// will be executed first
@ListenerPriority(5)
class HighPriorityListener implements BeforeEnterListener {
}
// will be executed second, default priority is 0
class YetAnotherListener implements BeforeEnterListener {
}
// will be executed third
@ListenerPriority(-5)
class LowPriorityListener implements BeforeEnterListener {
}
- Since:
- 1.0
- Author:
- Bernd Hopp
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionintThe priority of the annotated listener, can be any integer.
-
Element Details
-
value
int valueThe priority of the annotated listener, can be any integer. Larger numbers indicate higher priority.- Returns:
- the priority-value.
-