summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2012-09-19 16:40:52 +0300
committerJohannes Dahlström <johannesd@vaadin.com>2012-09-19 16:50:49 +0300
commitc4323e999fcbc05e04388dd37374487cb9f72634 (patch)
tree90a5ecf77d684cb79ba9667238ac12dd326469a6
parentb9164cf83032f43dfcd5fe5e96dd430e4f3120df (diff)
downloadvaadin-framework-c4323e999fcbc05e04388dd37374487cb9f72634.tar.gz
vaadin-framework-c4323e999fcbc05e04388dd37374487cb9f72634.zip
Change "close" to "cleanup" in UI (#9625)
-rw-r--r--server/src/com/vaadin/server/DeploymentConfiguration.java6
-rw-r--r--server/src/com/vaadin/server/VaadinPortlet.java2
-rw-r--r--server/src/com/vaadin/server/VaadinServlet.java2
-rw-r--r--server/src/com/vaadin/server/VaadinSession.java16
-rw-r--r--server/src/com/vaadin/ui/UI.java38
5 files changed, 32 insertions, 32 deletions
diff --git a/server/src/com/vaadin/server/DeploymentConfiguration.java b/server/src/com/vaadin/server/DeploymentConfiguration.java
index 0333091632..09405d6004 100644
--- a/server/src/com/vaadin/server/DeploymentConfiguration.java
+++ b/server/src/com/vaadin/server/DeploymentConfiguration.java
@@ -59,15 +59,15 @@ public interface DeploymentConfiguration extends Serializable {
/**
* Returns whether UIs that have no other activity than heartbeat requests
- * should be closed after they have been idle the maximum inactivity time
- * enforced by the session.
+ * should be removed from the session after they have been idle the maximum
+ * inactivity time enforced by the session.
*
* @see WrappedSession#getMaxInactiveInterval()
*
* @since 7.0.0
*
* @return True if UIs receiving only heartbeat requests are eventually
- * closed; false if heartbeat requests extend UI lifetime
+ * removed; false if heartbeat requests extend UI lifetime
* indefinitely.
*/
public boolean isIdleUICleanupEnabled();
diff --git a/server/src/com/vaadin/server/VaadinPortlet.java b/server/src/com/vaadin/server/VaadinPortlet.java
index 1462db5899..dc1f93b2a8 100644
--- a/server/src/com/vaadin/server/VaadinPortlet.java
+++ b/server/src/com/vaadin/server/VaadinPortlet.java
@@ -687,7 +687,7 @@ public class VaadinPortlet extends GenericPortlet implements Constants {
} finally {
if (applicationRunning) {
- application.closeInactiveUIs();
+ application.cleanupInactiveUIs();
}
CurrentInstance.clearAll();
diff --git a/server/src/com/vaadin/server/VaadinServlet.java b/server/src/com/vaadin/server/VaadinServlet.java
index 1d92151288..c42d029dc4 100644
--- a/server/src/com/vaadin/server/VaadinServlet.java
+++ b/server/src/com/vaadin/server/VaadinServlet.java
@@ -491,7 +491,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
} finally {
if (applicationRunning) {
- application.closeInactiveUIs();
+ application.cleanupInactiveUIs();
}
CurrentInstance.clearAll();
diff --git a/server/src/com/vaadin/server/VaadinSession.java b/server/src/com/vaadin/server/VaadinSession.java
index 35a53fc6db..f1d4ab343a 100644
--- a/server/src/com/vaadin/server/VaadinSession.java
+++ b/server/src/com/vaadin/server/VaadinSession.java
@@ -316,7 +316,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
public void close() {
applicationIsRunning = false;
for (UI ui : getUIs()) {
- ui.fireCloseEvent();
+ ui.fireCleanupEvent();
}
}
@@ -1166,12 +1166,12 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
/**
* Removes all those UIs from the session for which {@link #isUIAlive}
- * returns false. Close events are fired for the removed UIs.
+ * returns false. Cleanup events are fired for the removed UIs.
* <p>
* Called by the framework at the end of every request.
*
- * @see UI.CloseEvent
- * @see UI.CloseListener
+ * @see UI.CleanupEvent
+ * @see UI.CleanupListener
* @see #isUIAlive(UI)
*
* @since 7.0.0
@@ -1179,13 +1179,13 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
* @deprecated might be refactored or removed before 7.0.0
*/
@Deprecated
- public void closeInactiveUIs() {
+ public void cleanupInactiveUIs() {
for (Iterator<UI> i = uIs.values().iterator(); i.hasNext();) {
UI ui = i.next();
if (!isUIAlive(ui)) {
i.remove();
retainOnRefreshUIs.values().remove(ui.getUIId());
- ui.fireCloseEvent();
+ ui.fireCleanupEvent();
getLogger().fine(
"Closed UI #" + ui.getUIId() + " due to inactivity");
}
@@ -1200,7 +1200,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
* timeout never occurs.
*
* @see #getUidlRequestTimeout()
- * @see #closeInactiveUIs()
+ * @see #cleanupInactiveUIs()
* @see DeploymentConfiguration#getHeartbeatInterval()
*
* @since 7.0.0
@@ -1225,7 +1225,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
*
* @see DeploymentConfiguration#isIdleUICleanupEnabled()
* @see #getHeartbeatTimeout()
- * @see #closeInactiveUIs()
+ * @see #cleanupInactiveUIs()
*
* @since 7.0.0
*
diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java
index 3ad0cc57fa..dd5bcd231f 100644
--- a/server/src/com/vaadin/ui/UI.java
+++ b/server/src/com/vaadin/ui/UI.java
@@ -411,11 +411,11 @@ public abstract class UI extends AbstractComponentContainer implements
/**
* Event fired when a UI is removed from the application.
*/
- public static class CloseEvent extends Event {
+ public static class CleanupEvent extends Event {
- private static final String CLOSE_EVENT_IDENTIFIER = "uiClose";
+ private static final String CLEANUP_EVENT_IDENTIFIER = "uiCleanup";
- public CloseEvent(UI source) {
+ public CleanupEvent(UI source) {
super(source);
}
@@ -425,23 +425,23 @@ public abstract class UI extends AbstractComponentContainer implements
}
/**
- * Interface for listening {@link UI.CloseEvent UI close events}.
+ * Interface for listening {@link UI.CleanupEvent UI cleanup events}.
*
*/
- public interface CloseListener extends EventListener {
+ public interface CleanupListener extends EventListener {
- public static final Method closeMethod = ReflectTools.findMethod(
- CloseListener.class, "click", CloseEvent.class);
+ public static final Method cleanupMethod = ReflectTools.findMethod(
+ CleanupListener.class, "cleanup", CleanupEvent.class);
/**
- * Called when a CloseListener is notified of a CloseEvent.
+ * Called when a CleanupListener is notified of a CleanupEvent.
* {@link UI#getCurrent()} returns <code>event.getUI()</code> within
* this method.
*
* @param event
* The close event that was fired.
*/
- public void close(CloseEvent event);
+ public void cleanup(CleanupEvent event);
}
/**
@@ -654,10 +654,10 @@ public abstract class UI extends AbstractComponentContainer implements
/**
* For internal use only.
*/
- public void fireCloseEvent() {
+ public void fireCleanupEvent() {
UI current = UI.getCurrent();
UI.setCurrent(this);
- fireEvent(new CloseEvent(this));
+ fireEvent(new CleanupEvent(this));
UI.setCurrent(current);
}
@@ -1126,9 +1126,9 @@ public abstract class UI extends AbstractComponentContainer implements
* @param listener
* The CloseListener that should be added.
*/
- public void addCloseListener(CloseListener listener) {
- addListener(CloseEvent.CLOSE_EVENT_IDENTIFIER, CloseEvent.class,
- listener, CloseListener.closeMethod);
+ public void addCleanupListener(CleanupListener listener) {
+ addListener(CleanupEvent.CLEANUP_EVENT_IDENTIFIER, CleanupEvent.class,
+ listener, CleanupListener.cleanupMethod);
}
/**
@@ -1154,14 +1154,14 @@ public abstract class UI extends AbstractComponentContainer implements
/**
* Removes a close listener from the UI, if previously added with
- * {@link #addCloseListener(CloseListener)}.
+ * {@link #addCleanupListener(CleanupListener)}.
*
* @param listener
* The CloseListener that should be removed
*/
- public void removeCloseListener(CloseListener listener) {
- removeListener(CloseEvent.CLOSE_EVENT_IDENTIFIER, CloseEvent.class,
- listener);
+ public void removeCleanupListener(CleanupListener listener) {
+ removeListener(CleanupEvent.CLEANUP_EVENT_IDENTIFIER,
+ CleanupEvent.class, listener);
}
/**
@@ -1362,7 +1362,7 @@ public abstract class UI extends AbstractComponentContainer implements
* heartbeat for this UI.
*
* @see #heartbeat()
- * @see VaadinSession#closeInactiveUIs()
+ * @see VaadinSession#cleanupInactiveUIs()
*
* @return The time the last heartbeat request occurred.
*/