Class IndexHtmlResponse

java.lang.Object
com.vaadin.flow.server.communication.IndexHtmlResponse

public class IndexHtmlResponse extends Object
This represents the state of a Index HTML response being generated. The Index HTML response contains of the full DOM of the HTML document as well as the HTTP headers that will be included in the corresponding HTTP response.
  • Constructor Details

    • IndexHtmlResponse

      public IndexHtmlResponse(VaadinRequest vaadinRequest, VaadinResponse vaadinResponse, org.jsoup.nodes.Document document, UI ui)
      Create a response object for client side bootstrapping with UI.
      Parameters:
      vaadinRequest - the vaadin request which is handling
      vaadinResponse - the corresponding vaadin response
      document - the Document object of the response page
      ui - the UI for the bootstrap
    • IndexHtmlResponse

      public IndexHtmlResponse(VaadinRequest vaadinRequest, VaadinResponse vaadinResponse, org.jsoup.nodes.Document document)
      Create a response object for client side bootstrapping.
      Parameters:
      vaadinRequest - the vaadin request which is handling
      vaadinResponse - the corresponding vaadin response
      document - the Document object of the response page
  • Method Details

    • getVaadinRequest

      public VaadinRequest getVaadinRequest()
      Get the request which triggers the Index HTML response.
      Returns:
      the Vaadin request
    • getVaadinResponse

      public VaadinResponse getVaadinResponse()
      Get the Vaadin response object including all the headers which will be sent to browser.
      Returns:
      the Vaadin response
    • getDocument

      public org.jsoup.nodes.Document getDocument()
      Get the index.html response in form of a Document instance.
      Returns:
      the index document
    • getUI

      public Optional<UI> getUI()
      Gets the UI that will be displayed on the generated HTML page.
      Returns:
      the UI