com.vaadin.flow.internal.

Interface DevModeHandler

    • Method Summary

      All Methods
      Modifier and Type Method and Description
      String getFailedOutput()

      Return webpack console output when a compilation error happened.

      boolean isDevModeRequest(javax.servlet.http.HttpServletRequest request)

      Returns true if it's a request that should be handled by webpack.

      HttpURLConnection prepareConnection(String path, String method)

      Prepare a HTTP connection against webpack-dev-server.

      boolean serveDevModeRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

      Serve a file by proxying to webpack.

      void stop()

      Stop the dev-server.

    • Method Detail

      • getFailedOutput

        String getFailedOutput()

        Return webpack console output when a compilation error happened.

        Returns:

        console output if error or null otherwise.

      • prepareConnection

        HttpURLConnection prepareConnection(String path,
                                            String method)
                                     throws IOException

        Prepare a HTTP connection against webpack-dev-server.

        Parameters:

        path - the file to request, needs to be safe

        method - the http method to use

        Returns:

        the connection

        Throws:

        IOException - on connection error

      • isDevModeRequest

        boolean isDevModeRequest(javax.servlet.http.HttpServletRequest request)

        Returns true if it's a request that should be handled by webpack.

        Parameters:

        request - the servlet request

        Returns:

        true if the request should be forwarded to webpack

      • serveDevModeRequest

        boolean serveDevModeRequest(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response)
                             throws IOException

        Serve a file by proxying to webpack.

        Parameters:

        request - the servlet request

        response - the servlet response

        Returns:

        false if webpack returned a not found, true otherwise

        Throws:

        IOException - in the case something went wrong like connection refused

      • stop

        void stop()

        Stop the dev-server.