Package com.vaadin.client.communication
Class PushConfiguration
- java.lang.Object
-
- com.vaadin.client.communication.PushConfiguration
-
public class PushConfiguration extends Object
Provides the push configuration stored in the root node with an easier to use API. Additionally tracks when push is enabled/disabled and informsMessageSender.- Since:
- 1.0
- Author:
- Vaadin Ltd
-
-
Constructor Summary
Constructors Constructor Description PushConfiguration(Registry registry)Creates a new instance connected to the given registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsMap<String,String>getParameters()Gets all configured push parameters.StringgetPushServletMapping()Gets the push servlet mapping configured or determined on the server.booleanisAlwaysXhrToServer()Checks if XHR should be used for client -> server messages even though we are using a bidirectional push transport such as websockets.booleanisPushEnabled()Checks if push is enabled.
-
-
-
Constructor Detail
-
PushConfiguration
public PushConfiguration(Registry registry)
Creates a new instance connected to the given registry.- Parameters:
registry- the global registry
-
-
Method Detail
-
getPushServletMapping
public String 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
public JsMap<String,String> 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
-
-