summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-04-05 18:33:55 +0300
committerLeif Åstrand <leif@vaadin.com>2013-04-10 14:47:37 +0300
commit150352f64cdb49a27b110bd32e049c307fcf3486 (patch)
tree5a40f4a276d3f22d639ba2eb0cfd1e59e27b8049 /shared
parent2700cd2fe6c48b29478f1b8e14fde1d405a6ab7d (diff)
downloadvaadin-framework-150352f64cdb49a27b110bd32e049c307fcf3486.tar.gz
vaadin-framework-150352f64cdb49a27b110bd32e049c307fcf3486.zip
Implemented poll interval for UI (#11495)
Change-Id: Ic56b0123970f18e282c75d67863569ac55c72ea8
Diffstat (limited to 'shared')
-rw-r--r--shared/src/com/vaadin/shared/communication/MethodInvocation.java27
-rw-r--r--shared/src/com/vaadin/shared/ui/ui/UIServerRpc.java7
-rw-r--r--shared/src/com/vaadin/shared/ui/ui/UIState.java1
3 files changed, 35 insertions, 0 deletions
diff --git a/shared/src/com/vaadin/shared/communication/MethodInvocation.java b/shared/src/com/vaadin/shared/communication/MethodInvocation.java
index 417ced76be..d5bf8324ef 100644
--- a/shared/src/com/vaadin/shared/communication/MethodInvocation.java
+++ b/shared/src/com/vaadin/shared/communication/MethodInvocation.java
@@ -19,6 +19,8 @@ package com.vaadin.shared.communication;
import java.io.Serializable;
import java.util.Arrays;
+import com.vaadin.shared.util.SharedUtil;
+
/**
* Information needed by the framework to send an RPC method invocation from the
* client to the server or vice versa.
@@ -85,4 +87,29 @@ public class MethodInvocation implements Serializable {
return connectorId + "-" + getInterfaceName() + "-" + getMethodName();
}
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof MethodInvocation)) {
+ return false;
+ }
+ MethodInvocation other = (MethodInvocation) obj;
+ if (!SharedUtil.equals(getConnectorId(), other.getConnectorId())) {
+ return false;
+ }
+
+ if (!SharedUtil.equals(getInterfaceName(), other.getInterfaceName())) {
+ return false;
+ }
+
+ if (!SharedUtil.equals(getMethodName(), other.getMethodName())) {
+ return false;
+ }
+
+ if (!SharedUtil.equals(getParameters(), other.getParameters())) {
+ return false;
+ }
+
+ return true;
+
+ }
} \ No newline at end of file
diff --git a/shared/src/com/vaadin/shared/ui/ui/UIServerRpc.java b/shared/src/com/vaadin/shared/ui/ui/UIServerRpc.java
index 358ba2e24e..576ee83980 100644
--- a/shared/src/com/vaadin/shared/ui/ui/UIServerRpc.java
+++ b/shared/src/com/vaadin/shared/ui/ui/UIServerRpc.java
@@ -26,4 +26,11 @@ public interface UIServerRpc extends ClickRpc, ServerRpc {
@Delayed(lastOnly = true)
public void scroll(int scrollTop, int scrollLeft);
+
+ @Delayed(lastOnly = true)
+ /*
+ * @Delayed just to get lastOnly semantics, sendPendingVariableChanges()
+ * should always be called to ensure the message is flushed right away.
+ */
+ public void poll();
} \ No newline at end of file
diff --git a/shared/src/com/vaadin/shared/ui/ui/UIState.java b/shared/src/com/vaadin/shared/ui/ui/UIState.java
index d5ee4c30e6..fbb6427c6f 100644
--- a/shared/src/com/vaadin/shared/ui/ui/UIState.java
+++ b/shared/src/com/vaadin/shared/ui/ui/UIState.java
@@ -22,6 +22,7 @@ import com.vaadin.shared.ui.TabIndexState;
public class UIState extends TabIndexState {
public TooltipConfiguration tooltipConfiguration = new TooltipConfiguration();
public LoadingIndicatorConfiguration loadingIndicatorConfiguration = new LoadingIndicatorConfiguration();
+ public int pollInterval = -1;
public static class LoadingIndicatorConfiguration implements Serializable {
public int initialDelay = 300;