com.vaadin.server
Class BootstrapPageResponse
java.lang.Object
java.util.EventObject
com.vaadin.server.BootstrapResponse
com.vaadin.server.BootstrapPageResponse
- All Implemented Interfaces:
- java.io.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
Fields inherited from class java.util.EventObject |
source |
Method Summary |
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(java.lang.String name,
long timestamp)
Properly formats a timestamp as a date in a header that will be included
in the HTTP response. |
void |
setHeader(java.lang.String name,
java.lang.String value)
Sets a header value that will be added to the HTTP response. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BootstrapPageResponse
public BootstrapPageResponse(BootstrapHandler handler,
WrappedRequest request,
VaadinSession session,
java.lang.Class<? extends UI> uiClass,
org.jsoup.nodes.Document document,
java.util.Map<java.lang.String,java.lang.Object> headers)
- Crate a new bootstrap page response.
- Parameters:
handler
- the bootstrap handler that is firing the eventrequest
- the wrapped request for which the bootstrap page should be
generatedsession
- the vaadin 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 added- See Also:
BootstrapResponse.BootstrapResponse(BootstrapHandler,
WrappedRequest, VaadinSession, Class)
setHeader
public void setHeader(java.lang.String name,
java.lang.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:
WrappedResponse.setHeader(String, String)
setDateHeader
public void setDateHeader(java.lang.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)
,
WrappedResponse.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
Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.