com.vaadin.server
Class BootstrapPageResponse

java.lang.Object
  extended by java.util.EventObject
      extended by com.vaadin.server.BootstrapResponse
          extended by 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

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
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.
 
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 com.vaadin.server.BootstrapResponse
getBootstrapHandler, getRequest, getUiClass, getVaadinSession
 
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
 

Constructor Detail

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 event
request - the wrapped request for which the bootstrap page should be generated
session - the vaadin 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
See Also:
BootstrapResponse.BootstrapResponse(BootstrapHandler, WrappedRequest, VaadinSession, Class)
Method Detail

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 header
value - 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 header
timestamp - 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.