aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/Application.java
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-08-14 13:08:38 +0300
committerLeif Åstrand <leif@vaadin.com>2012-08-14 13:08:38 +0300
commitb811f7c586610f01c74b84499f076508b7ec1f21 (patch)
tree7a8346b8b3be5b44c3ae8350160b6cbd5dbe4d7b /server/src/com/vaadin/Application.java
parent15be9557333bc0ff2fea4b2c1cb7f132d8de5481 (diff)
downloadvaadin-framework-b811f7c586610f01c74b84499f076508b7ec1f21.tar.gz
vaadin-framework-b811f7c586610f01c74b84499f076508b7ec1f21.zip
Javadocs for #9274
Diffstat (limited to 'server/src/com/vaadin/Application.java')
-rw-r--r--server/src/com/vaadin/Application.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/server/src/com/vaadin/Application.java b/server/src/com/vaadin/Application.java
index c7f3462b05..05951ce88f 100644
--- a/server/src/com/vaadin/Application.java
+++ b/server/src/com/vaadin/Application.java
@@ -2406,6 +2406,18 @@ public class Application implements Terminal.ErrorListener, Serializable {
return roots.get(rootId);
}
+ /**
+ * Adds a listener that will be invoked when the bootstrap HTML is about to
+ * be generated. This can be used to modify the contents of the HTML that
+ * loads the Vaadin application in the browser and the HTTP headers that are
+ * included in the response serving the HTML.
+ *
+ * @see BootstrapListener#modifyBootstrapFragment(BootstrapFragmentResponse)
+ * @see BootstrapListener#modifyBootstrapPage(BootstrapPageResponse)
+ *
+ * @param listener
+ * the bootstrap listener to add
+ */
public void addBootstrapListener(BootstrapListener listener) {
eventRouter.addListener(BootstrapFragmentResponse.class, listener,
BOOTSTRAP_FRAGMENT_METHOD);
@@ -2413,6 +2425,14 @@ public class Application implements Terminal.ErrorListener, Serializable {
BOOTSTRAP_PAGE_METHOD);
}
+ /**
+ * Remove a bootstrap listener that was previously added.
+ *
+ * @see #addBootstrapListener(BootstrapListener)
+ *
+ * @param listener
+ * the bootstrap listener to remove
+ */
public void removeBootstrapListener(BootstrapListener listener) {
eventRouter.removeListener(BootstrapFragmentResponse.class, listener,
BOOTSTRAP_FRAGMENT_METHOD);
@@ -2420,6 +2440,15 @@ public class Application implements Terminal.ErrorListener, Serializable {
BOOTSTRAP_PAGE_METHOD);
}
+ /**
+ * Fires a bootstrap event to all registered listeners. There are currently
+ * two supported events, both inheriting from {@link BootstrapResponse}:
+ * {@link BootstrapFragmentResponse} and {@link BootstrapPageResponse}.
+ *
+ * @param response
+ * the bootstrap response event for which listeners should be
+ * fired
+ */
public void modifyBootstrapResponse(BootstrapResponse response) {
eventRouter.fireEvent(response);
}