aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2012-11-01 15:10:40 +0200
committerVaadin Code Review <review@vaadin.com>2012-11-20 11:25:37 +0000
commit1384f1eb2c973252da27d6e379d8b863d912b22e (patch)
treee2aad5da0e41b03dc9cb05e84e3b8e09ee9d7cbf /server/src/com/vaadin/ui
parent0e8647784782e132bed9ec93ed47ea876f753534 (diff)
downloadvaadin-framework-1384f1eb2c973252da27d6e379d8b863d912b22e.tar.gz
vaadin-framework-1384f1eb2c973252da27d6e379d8b863d912b22e.zip
When closeIdleUIs is true, close open UIs only after all UIs have been idle for longer than the session timeout
* Rename closeIdleUIs to closeIdleSessions, isIdleUICleanupEnabled to isCloseIdleSessions (#10252) * Close the whole session at the same time as well * Move UI lastUidlRequestTime to VaadinSession lastRequestTimestamp (#10253) * Rename VaadinSession lastRequestTime to lastRequestDuration, totalSessionTime to cumulativeRequestDuration (#10253) * Rename UI lastHeartbeatTime to lastHeartbeatTimestamp * Show "Session Expired" notification when a heartbeat fails because of this Change-Id: If3d4bd9add9995f435c29812eec00b3a3a92a6e6
Diffstat (limited to 'server/src/com/vaadin/ui')
-rw-r--r--server/src/com/vaadin/ui/UI.java40
1 files changed, 12 insertions, 28 deletions
diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java
index 342983e8b8..83936a7478 100644
--- a/server/src/com/vaadin/ui/UI.java
+++ b/server/src/com/vaadin/ui/UI.java
@@ -172,9 +172,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* current time whenever the application receives a heartbeat or UIDL
* request from the client for this UI.
*/
- private long lastHeartbeat = System.currentTimeMillis();
-
- private long lastUidlRequest = System.currentTimeMillis();
+ private long lastHeartbeatTimestamp = System.currentTimeMillis();
/**
* Creates a new empty UI without a caption. The content of the UI must be
@@ -942,43 +940,29 @@ public abstract class UI extends AbstractSingleComponentContainer implements
}
/**
- * Returns the timestamp (milliseconds since the epoch) of the last received
- * heartbeat for this UI.
+ * Returns the timestamp of the last received heartbeat for this UI.
*
* @see #heartbeat()
* @see VaadinSession#cleanupInactiveUIs()
*
- * @return The time the last heartbeat request occurred.
- */
- public long getLastHeartbeatTime() {
- return lastHeartbeat;
- }
-
- /**
- * Returns the timestamp (milliseconds since the epoch) of the last received
- * UIDL request for this UI.
- *
- * @return
+ * @return The time the last heartbeat request occurred, in milliseconds
+ * since the epoch.
*/
- public long getLastUidlRequestTime() {
- return lastUidlRequest;
+ public long getLastHeartbeatTimestamp() {
+ return lastHeartbeatTimestamp;
}
/**
* Sets the last heartbeat request timestamp for this UI. Called by the
* framework whenever the application receives a valid heartbeat request for
* this UI.
+ *
+ * @param lastHeartbeat
+ * The time the last heartbeat request occurred, in milliseconds
+ * since the epoch.
*/
- public void setLastHeartbeatTime(long lastHeartbeat) {
- this.lastHeartbeat = lastHeartbeat;
- }
-
- /**
- * Sets the last UIDL request timestamp for this UI. Called by the framework
- * whenever the application receives a valid UIDL request for this UI.
- */
- public void setLastUidlRequestTime(long lastUidlRequest) {
- this.lastUidlRequest = lastUidlRequest;
+ public void setLastHeartbeatTimestamp(long lastHeartbeat) {
+ lastHeartbeatTimestamp = lastHeartbeat;
}
/**