summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/Application.java
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2011-12-20 08:18:25 +0200
committerLeif Åstrand <leif@vaadin.com>2011-12-20 08:18:25 +0200
commit4f8eee15039de470261584e2b54807bb521ee06d (patch)
tree0195f6c51c51e692e9e02cf7cd65bf052c6ab631 /src/com/vaadin/Application.java
parentbec4c059b3bda90207fe883cca68640e3564cece (diff)
downloadvaadin-framework-4f8eee15039de470261584e2b54807bb521ee06d.tar.gz
vaadin-framework-4f8eee15039de470261584e2b54807bb521ee06d.zip
Add Application.getRoots()
Diffstat (limited to 'src/com/vaadin/Application.java')
-rw-r--r--src/com/vaadin/Application.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/com/vaadin/Application.java b/src/com/vaadin/Application.java
index 4f81a55786..587d22ddcd 100644
--- a/src/com/vaadin/Application.java
+++ b/src/com/vaadin/Application.java
@@ -2414,4 +2414,22 @@ public class Application implements Terminal.ErrorListener, Serializable {
public boolean isRootInitPending(int rootId) {
return !initedRoots.contains(Integer.valueOf(rootId));
}
+
+ /**
+ * Gets all the roots of this application. This includes roots that have
+ * been requested but not yet initialized. Please note, that roots are not
+ * automatically removed e.g. if the browser window is closed and that there
+ * is no way to manually remove a root. Inactive roots will thus not be
+ * released for GC until the entire application is released when the session
+ * has timed out (unless there are dangling references). Improved support
+ * for releasing unused roots is planned for an upcoming alpha release of
+ * Vaadin 7.
+ *
+ * @return a collection of roots belonging to this application
+ *
+ * @since 7.0
+ */
+ public Collection<Root> getRoots() {
+ return Collections.unmodifiableCollection(roots.values());
+ }
}