Class BootstrapPageResponse

  • All Implemented Interfaces:
    Serializable

    public class BootstrapPageResponse
    extends BootstrapResponse
    A representation of a bootstrap page being generated. The bootstrap page contains of the full DOM of the HTML document as well as the HTTP headers that will be included in the corresponding HTTP response.
    Since:
    7.0.0
    Author:
    Vaadin Ltd
    See Also:
    Serialized Form
    • Constructor Detail

      • BootstrapPageResponse

        public BootstrapPageResponse​(BootstrapHandler handler,
                                     VaadinRequest request,
                                     VaadinSession session,
                                     Class<? extends UI> uiClass,
                                     org.jsoup.nodes.Document document,
                                     Map<String,​Object> headers,
                                     UIProvider uiProvider)
        Crate a new bootstrap page response.
        Parameters:
        handler - the bootstrap handler that is firing the event
        request - the Vaadin request for which the bootstrap page should be generated
        session - the service session for which the bootstrap page should be generated
        uiClass - the class of the UI that will be displayed on the page
        document - the DOM document making up the HTML page
        headers - a map into which header data can be added
        uiProvider - the UI provider for the bootstrap
        See Also:
        BootstrapResponse#BootstrapResponse(BootstrapHandler, VaadinRequest, VaadinSession, Class)
    • Method Detail

      • setHeader

        public void setHeader​(String name,
                              String value)
        Sets a header value that will be added to the HTTP response. If the header had already been set, the new value overwrites the previous one.
        Parameters:
        name - the name of the header
        value - the header value
        See Also:
        VaadinResponse.setHeader(String, String)
      • setDateHeader

        public void setDateHeader​(String name,
                                  long timestamp)
        Properly formats a timestamp as a date in a header that will be included in the HTTP response. If the header had already been set, the new value overwrites the previous one.
        Parameters:
        name - the name of the header
        timestamp - the number of milliseconds since epoch
        See Also:
        setHeader(String, String), VaadinResponse.setDateHeader(String, long)
      • getDocument

        public org.jsoup.nodes.Document getDocument()
        Gets the document node representing the root of the DOM hierarchy that will be used to generate the HTML page. Changes to the document will be reflected in the HTML.
        Returns:
        the document node