Package com.vaadin.client.communication
Class PushConfiguration
java.lang.Object
com.vaadin.client.communication.PushConfiguration
Provides the push configuration stored in the root node with an easier to use
API.
Additionally tracks when push is enabled/disabled and informs
MessageSender.- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Constructor Summary
ConstructorsConstructorDescriptionPushConfiguration(Registry registry) Creates a new instance connected to the given registry. -
Method Summary
Modifier and TypeMethodDescriptionGets all configured push parameters.Gets the push servlet mapping configured or determined on the server.booleanChecks if XHR should be used for client -> server messages even though we are using a bidirectional push transport such as websockets.booleanChecks if push is enabled.
-
Constructor Details
-
PushConfiguration
Creates a new instance connected to the given registry.- Parameters:
registry- the global registry
-
-
Method Details
-
getPushServletMapping
Gets the push servlet mapping configured or determined on the server.- Returns:
- the push servlet mapping configured or determined on the server or null if none has been configured
-
isAlwaysXhrToServer
public boolean isAlwaysXhrToServer()Checks if XHR should be used for client -> server messages even though we are using a bidirectional push transport such as websockets.- Returns:
- true if XHR should always be used, false otherwise
-
getParameters
Gets all configured push parameters. The parameters configured on the server, including transports.- Returns:
- a map of all parameters configured on the server
-
isPushEnabled
public boolean isPushEnabled()Checks if push is enabled.- Returns:
- true if push is enabled, false otherwise
-