You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
com.vaadin.flow.router.

Interface NavigationHandler

  • All Superinterfaces:

    Serializable

    All Known Implementing Classes:

    AbstractNavigationStateRenderer, ErrorStateRenderer, InternalRedirectHandler, NavigationStateRenderer

    Functional Interface:

    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface NavigationHandler
    extends Serializable

    Handles navigation to a location e.g. by showing a navigation target component in a UI or by redirecting the user to another location.

    Subclasses using external data should take care to avoid synchronization issues since the same navigation handler instances may be used concurrently from multiple threads. Data provided in the navigation event should be safe to use without synchronization since the associated VaadinSession and everything related to it will be locked.

    Since:

    1.0

    Author:

    Vaadin Ltd

    • Method Summary

      All Methods
      Modifier and Type Method Description
      int handle​(NavigationEvent event)

      Handles the navigation event.

    • Method Detail

      • handle

        int handle​(NavigationEvent event)

        Handles the navigation event.

        Parameters:

        event - the navigation event to handle

        Returns:

        the HTTP status code to return to the client if handling an initial rendering request