diff options
author | Leif Åstrand <leif@vaadin.com> | 2013-04-17 14:25:48 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-04-17 14:37:52 +0000 |
commit | b8614ad16cac44637dbfa11829b4cb896c4ac9cf (patch) | |
tree | e0337ad6721ea9bf59b10ec9d17628e46738d749 /shared | |
parent | 0f75f202d333ac507fb3e5efb8e9bd4d4719e098 (diff) | |
download | vaadin-framework-b8614ad16cac44637dbfa11829b4cb896c4ac9cf.tar.gz vaadin-framework-b8614ad16cac44637dbfa11829b4cb896c4ac9cf.zip |
Add PushMode.isEnabled() (#11626)
Change-Id: I416dc73566e2404a6dce35045fc79f9038e8dd5e
Diffstat (limited to 'shared')
-rw-r--r-- | shared/src/com/vaadin/shared/communication/PushMode.java | 11 |
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; + } } |