Package com.vaadin.shared.communication
Enum PushMode
- java.lang.Object
-
- java.lang.Enum<PushMode>
-
- com.vaadin.shared.communication.PushMode
-
- All Implemented Interfaces:
Serializable
,Comparable<PushMode>
public enum PushMode extends Enum<PushMode>
The mode of bidirectional ("push") communication that is in use.- Since:
- 7.1
- Author:
- Vaadin Ltd
- See Also:
DeploymentConfiguration.getPushMode()
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isEnabled()
Checks whether the push mode is using push functionalitystatic PushMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static PushMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DISABLED
public static final PushMode DISABLED
Push is disabled. Regular AJAX requests are used to communicate between the client and the server. Asynchronous messages from the server are not possible.ui.push()
throws IllegalStateException.This is the default mode unless
configured
otherwise.
-
MANUAL
public static final PushMode MANUAL
Push is enabled. A bidirectional channel is established between the client and server and used to communicate state changes and RPC invocations. The client is not automatically updated if the server-side state is asynchronously changed;ui.push()
must be explicitly called.
-
-
Method Detail
-
values
public static PushMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PushMode c : PushMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PushMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isEnabled
public boolean isEnabled()
Checks whether the push mode is using push functionality- Returns:
true
if this mode requires push functionality;false
if no push functionality is used for this mode.
-
-