Class RouteUnifyingIndexHtmlRequestListener

java.lang.Object
com.vaadin.hilla.route.RouteUnifyingIndexHtmlRequestListener
All Implemented Interfaces:
com.vaadin.flow.server.communication.IndexHtmlRequestListener, Serializable, EventListener

public class RouteUnifyingIndexHtmlRequestListener extends Object implements com.vaadin.flow.server.communication.IndexHtmlRequestListener
Index HTML request listener for collecting the client side and the server side views and adding them to index.html response.
See Also:
  • Field Details

  • Constructor Details

    • RouteUnifyingIndexHtmlRequestListener

      public RouteUnifyingIndexHtmlRequestListener(ClientRouteRegistry clientRouteRegistry, com.vaadin.flow.function.DeploymentConfiguration deploymentConfiguration, RouteUtil routeUtil, @Nullable com.vaadin.flow.server.auth.NavigationAccessControl accessControl, @Nullable com.vaadin.flow.server.auth.ViewAccessChecker viewAccessChecker, boolean exposeServerRoutesToClient)
      Creates a new listener instance with the given route registry.
      Parameters:
      clientRouteRegistry - the client route registry for getting the client side views
      deploymentConfiguration - the runtime deployment configuration
      routeUtil - the ClientRouteRegistry aware utility for checking if user is allowed to access a route
      exposeServerRoutesToClient - whether to expose server routes to the client
  • Method Details

    • modifyIndexHtmlResponse

      public void modifyIndexHtmlResponse(com.vaadin.flow.server.communication.IndexHtmlResponse response)
      Specified by:
      modifyIndexHtmlResponse in interface com.vaadin.flow.server.communication.IndexHtmlRequestListener
    • collectClientViews

      protected Map<String,AvailableViewInfo> collectClientViews(Predicate<? super String> isUserInRole, boolean isUserAuthenticated)
    • collectServerViews

      protected Map<String,AvailableViewInfo> collectServerViews(com.vaadin.flow.server.VaadinRequest vaadinRequest)