diff options
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; + } } |