Class DevBundleBuildingHandler

java.lang.Object
com.vaadin.base.devserver.DevBundleBuildingHandler
All Implemented Interfaces:
com.vaadin.flow.internal.DevModeHandler, com.vaadin.flow.server.RequestHandler, Serializable

public final class DevBundleBuildingHandler extends Object implements com.vaadin.flow.internal.DevModeHandler
A fake DevModeHandler whose only purpose is to eagerly show a "build in progress" HTML page to the user, during the creation of the development bundle.

The getPort() method returns a fixed value of -1, meaning that this handler will not start a server listening for incoming requests.

Most of the other methods should not be invoked, and they may throw an exception if called.

See Also:
  • Constructor Details

    • DevBundleBuildingHandler

      public DevBundleBuildingHandler(CompletableFuture<Void> buildCompletedFuture)
  • Method Details

    • getFailedOutput

      public String getFailedOutput()
      Specified by:
      getFailedOutput in interface com.vaadin.flow.internal.DevModeHandler
    • prepareConnection

      public HttpURLConnection prepareConnection(String path, String method)
      Specified by:
      prepareConnection in interface com.vaadin.flow.internal.DevModeHandler
    • serveDevModeRequest

      public boolean serveDevModeRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Specified by:
      serveDevModeRequest in interface com.vaadin.flow.internal.DevModeHandler
    • stop

      public void stop()
      Specified by:
      stop in interface com.vaadin.flow.internal.DevModeHandler
    • getProjectRoot

      public File getProjectRoot()
      Specified by:
      getProjectRoot in interface com.vaadin.flow.internal.DevModeHandler
    • getPort

      public int getPort()
      Gets always -1, as this handler does not start a server.
      Specified by:
      getPort in interface com.vaadin.flow.internal.DevModeHandler
      Returns:
      -1
    • handleRequest

      public boolean handleRequest(com.vaadin.flow.server.VaadinSession session, com.vaadin.flow.server.VaadinRequest request, com.vaadin.flow.server.VaadinResponse response) throws IOException
      Specified by:
      handleRequest in interface com.vaadin.flow.server.RequestHandler
      Throws:
      IOException
    • waitForDevBundle

      public void waitForDevBundle()
      Waits for the dev bundle to be built.

      Suspends the caller's thread until the dev bundle is created (or failed to create).