Class RouteHandler

java.lang.Object
com.vaadin.copilot.CopilotCommand
com.vaadin.copilot.RouteHandler

public class RouteHandler extends CopilotCommand
Provides server side route information to the client.
  • Constructor Details

  • Method Details

    • handleMessage

      public boolean handleMessage(String command, tools.jackson.databind.JsonNode data, com.vaadin.base.devserver.DevToolsInterface devToolsInterface)
      Description copied from class: CopilotCommand
      Called whenever there is a message from the browser. Implementations should check if the command is for them, handle it and return true if the command was handled.
      Specified by:
      handleMessage in class CopilotCommand
      Parameters:
      command - the command to handle
      data - the data for the command
      devToolsInterface - the devtools interface for the connection
      Returns:
      true if the command was handled, false otherwise
    • getServerRoutes

      public static List<com.vaadin.flow.router.RouteData> getServerRoutes(com.vaadin.flow.server.VaadinSession vaadinSession)
    • getServerAutoLayouts

      public static Set<Class<?>> getServerAutoLayouts(com.vaadin.flow.server.VaadinSession vaadinSession)
    • getLayoutClasses

      public static Set<Class<? extends com.vaadin.flow.router.RouterLayout>> getLayoutClasses(com.vaadin.flow.server.VaadinSession vaadinSession, List<com.vaadin.flow.router.RouteData> routeDataList)
      Returns the unique layout classes that are used in given route list
      Parameters:
      vaadinSession - Vaadin session to access router
      routeDataList - List of routes
      Returns:
      the unique classes of Layouts