diff options
author | Artur Signell <artur@vaadin.com> | 2012-11-19 20:12:01 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2012-11-20 13:30:19 +0000 |
commit | 64075d9078052c5ac9446d6aab2debe8a46ccfba (patch) | |
tree | 9bd0f2bf1d9b37c3ff68aa55693bbf4944572836 /client/src | |
parent | 0308bf8b7b85ead586f21db82cd370c53fac46d6 (diff) | |
download | vaadin-framework-64075d9078052c5ac9446d6aab2debe8a46ccfba.tar.gz vaadin-framework-64075d9078052c5ac9446d6aab2debe8a46ccfba.zip |
Renamed suspend/resumeRendering be more descriptive (#10242)
Change-Id: I817fdab5529b0192f58e76ea31b97efb18b3f881
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/com/vaadin/client/ApplicationConnection.java | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java index 48815a3d8d..4c3eaff6aa 100644 --- a/client/src/com/vaadin/client/ApplicationConnection.java +++ b/client/src/com/vaadin/client/ApplicationConnection.java @@ -219,10 +219,10 @@ public class ApplicationConnection { private final RpcManager rpcManager; /** - * If renderingLocks contains any objects, rendering is to be suspended - * until the collection is empty or a timeout has occurred. + * If responseHandlingLocks contains any objects, response handling is + * suspended until the collection is empty or a timeout has occurred. */ - private Set<Object> renderingLocks = new HashSet<Object>(); + private Set<Object> responseHandlingLocks = new HashSet<Object>(); /** * Data structure holding information about pending UIDL messages. @@ -251,10 +251,10 @@ public class ApplicationConnection { } } - /** Contains all UIDL messages received while the rendering is suspended */ + /** Contains all UIDL messages received while response handling is suspended */ private List<PendingUIDLMessage> pendingUIDLMessages = new ArrayList<PendingUIDLMessage>(); - /** The max timeout the rendering phase may be suspended */ + /** The max timeout that response handling may be suspended */ private static final int MAX_SUSPENDED_TIMEOUT = 5000; /** Event bus for communication events */ @@ -1242,7 +1242,7 @@ public class ApplicationConnection { protected void handleUIDLMessage(final Date start, final String jsonText, final ValueMap json) { - if (!renderingLocks.isEmpty()) { + if (!responseHandlingLocks.isEmpty()) { // Some component is doing something that can't be interrupted // (e.g. animation that should be smooth). Enqueue the UIDL // message for later processing. @@ -3077,14 +3077,14 @@ public class ApplicationConnection { } /** - * Timer used to make sure that no misbehaving components can lock the - * rendering phase forever. + * Timer used to make sure that no misbehaving components can delay response + * handling forever. */ Timer forceHandleMessage = new Timer() { @Override public void run() { - VConsole.log("WARNING: rendering was never resumed, forcing reload..."); - renderingLocks.clear(); + VConsole.log("WARNING: reponse handling was never resumed, forcibly removing locks..."); + responseHandlingLocks.clear(); handlePendingMessages(); } }; @@ -3095,8 +3095,8 @@ public class ApplicationConnection { * * @param lock */ - public void suspendRendering(Object lock) { - renderingLocks.add(lock); + public void suspendReponseHandling(Object lock) { + responseHandlingLocks.add(lock); } /** @@ -3104,18 +3104,17 @@ public class ApplicationConnection { * * @param lock */ - public void resumeRendering(Object lock) { - VConsole.log("...resuming UIDL handling."); - renderingLocks.remove(lock); - if (renderingLocks.isEmpty()) { - VConsole.log("No more rendering locks, rendering pending requests."); + public void resumeResponseHandling(Object lock) { + responseHandlingLocks.remove(lock); + if (responseHandlingLocks.isEmpty()) { + VConsole.log("No more response handling locks, handling pending requests."); forceHandleMessage.cancel(); handlePendingMessages(); } } /** - * Handles all pending UIDL messages queued while the rendering was + * Handles all pending UIDL messages queued while response handling was * suspended. */ private void handlePendingMessages() { |