Package com.vaadin.server
Class BootstrapPageResponse
- java.lang.Object
-
- java.util.EventObject
-
- com.vaadin.server.BootstrapResponse
-
- com.vaadin.server.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
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.void
setDateHeader(String name, long timestamp)
Properly formats a timestamp as a date in a header that will be included in the HTTP response.void
setHeader(String name, String value)
Sets a header value that will be added to the HTTP response.-
Methods inherited from class com.vaadin.server.BootstrapResponse
getBootstrapHandler, getRequest, getSession, getUiClass, getUIProvider
-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
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 eventrequest
- the Vaadin request for which the bootstrap page should be generatedsession
- the service session for which the bootstrap page should be generateduiClass
- the class of the UI that will be displayed on the pagedocument
- the DOM document making up the HTML pageheaders
- a map into which header data can be addeduiProvider
- 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 headervalue
- 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 headertimestamp
- 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
-
-