summaryrefslogtreecommitdiffstats
path: root/shared/src/com
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-04-17 14:25:48 +0300
committerVaadin Code Review <review@vaadin.com>2013-04-17 14:37:52 +0000
commitb8614ad16cac44637dbfa11829b4cb896c4ac9cf (patch)
treee0337ad6721ea9bf59b10ec9d17628e46738d749 /shared/src/com
parent0f75f202d333ac507fb3e5efb8e9bd4d4719e098 (diff)
downloadvaadin-framework-b8614ad16cac44637dbfa11829b4cb896c4ac9cf.tar.gz
vaadin-framework-b8614ad16cac44637dbfa11829b4cb896c4ac9cf.zip
Add PushMode.isEnabled() (#11626)
Change-Id: I416dc73566e2404a6dce35045fc79f9038e8dd5e
Diffstat (limited to 'shared/src/com')
-rw-r--r--shared/src/com/vaadin/shared/communication/PushMode.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/shared/src/com/vaadin/shared/communication/PushMode.java b/shared/src/com/vaadin/shared/communication/PushMode.java
index f7414a89ea..3fe8b4ea3e 100644
--- a/shared/src/com/vaadin/shared/communication/PushMode.java
+++ b/shared/src/com/vaadin/shared/communication/PushMode.java
@@ -52,4 +52,15 @@ public enum PushMode {
* lock is released.
*/
AUTOMATIC;
+
+ /**
+ * Checks whether the push mode is using push functionality
+ *
+ * @return <code>true</code> if this mode requires push functionality;
+ * <code>false</code> if no push functionality is used for this
+ * mode.
+ */
+ public boolean isEnabled() {
+ return this != DISABLED;
+ }
}