com.holonplatform.vaadin.flow.navigator.internal

## Interface NavigatorRegistry

- All Superinterfaces:
    Serializable
  All Known Implementing Classes:
    DefaultNavigatorRegistry

      public interface NavigatorRegistry
      extends Serializable

  `Navigator` instances registry.
  Since:
    5.2.0

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `Optional<Navigator>` | `getNavigator(com.vaadin.flow.component.UI ui)` Get the `Navigator` bound to given UI, if available.
    `Navigator` | `getOrCreateNavigator(com.vaadin.flow.component.UI ui, Function<com.vaadin.flow.component.UI,Navigator> creator)` Get the `Navigator` bound to given UI, creating it if not present.
    `static Optional<NavigatorRegistry>` | `getSessionRegistry()` Get the `NavigatorRegistry` associated with current session, if available.
    `void` | `setNavigator(com.vaadin.flow.component.UI ui, Navigator navigator)` Bind the given `Navigator` instance to the given `ui`.

- - ### Method Detail

    - #### setNavigator

          void setNavigator(com.vaadin.flow.component.UI ui,
                            Navigator navigator)

      Bind the given `Navigator` instance to the given `ui`.

      If another `Navigator` instance was bound to given UI, it will be replaced by the new navigator instance.

      Parameters:
        `ui` - The UI (not null)
        `navigator` - The navigator (not null)

    - #### getNavigator

          Optional<Navigator> getNavigator(com.vaadin.flow.component.UI ui)

      Get the `Navigator` bound to given UI, if available.
      Parameters:
        `ui` - The UI for which to obtain the navigator (not null)
      Returns:
        Optional `Navigator` bound to given UI

    - #### getOrCreateNavigator

          Navigator getOrCreateNavigator(com.vaadin.flow.component.UI ui,
                                         Function<com.vaadin.flow.component.UI,Navigator> creator)

      Get the `Navigator` bound to given UI, creating it if not present.
      Parameters:
        `ui` - The UI for which to obtain the navigator (not null)
        `creator` - The function to use to create a new `Navigator` and bound it to the UI (not null)
      Returns:
        The `Navigator` bound to given UI

    - #### getSessionRegistry

          static Optional<NavigatorRegistry> getSessionRegistry()

      Get the `NavigatorRegistry` associated with current session, if available.
      Returns:
        Optional session registry

Copyright © 2019 The Holon Platform. All rights reserved.