summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorTapio Aali <tapio@vaadin.com>2015-02-09 15:37:41 +0200
committerVaadin Code Review <review@vaadin.com>2015-02-18 14:44:27 +0000
commit735f0748344d7ee594c4e52a715d867dfdb23cb1 (patch)
treea1a940c03cb1595e30486ddaa5cb1f64d61e412f /client
parentd23382ad25b0a9f1ab1bf864f8fd3746e5b1c320 (diff)
downloadvaadin-framework-735f0748344d7ee594c4e52a715d867dfdb23cb1.tar.gz
vaadin-framework-735f0748344d7ee594c4e52a715d867dfdb23cb1.zip
Make push path configurable (#14432).
In order to use websockets with Weblogic 12.1.2 or later, push path 'ws' needs to be used instead of 'PUSH'. Change-Id: Ia90d11c20a375cef9cf4a53986a70d616a83db06
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/communication/AtmospherePushConnection.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
index da08928f36..a3a8caa1b4 100644
--- a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
+++ b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
@@ -41,7 +41,7 @@ import elemental.json.JsonObject;
/**
* The default {@link PushConnection} implementation that uses Atmosphere for
* handling the communication channel.
- *
+ *
* @author Vaadin Ltd
* @since 7.1
*/
@@ -133,6 +133,8 @@ public class AtmospherePushConnection implements PushConnection {
*/
private Command pendingDisconnectCommand;
+ private String pushPath;
+
public AtmospherePushConnection() {
}
@@ -160,6 +162,9 @@ public class AtmospherePushConnection implements PushConnection {
pushConfiguration.parameters.get(param));
}
+ pushPath = pushConfiguration.pushPath;
+ assert pushPath != null;
+
runWhenAtmosphereLoaded(new Command() {
@Override
public void execute() {
@@ -176,7 +181,7 @@ public class AtmospherePushConnection implements PushConnection {
private void connect() {
String baseUrl = connection
.translateVaadinUri(ApplicationConstants.APP_PROTOCOL_PREFIX
- + ApplicationConstants.PUSH_PATH + '/');
+ + pushPath + '/');
String extraParams = UIConstants.UI_ID_PARAMETER + "="
+ connection.getConfiguration().getUIId();
@@ -251,9 +256,9 @@ public class AtmospherePushConnection implements PushConnection {
/**
* Called whenever a server push connection is established (or
* re-established).
- *
+ *
* @param response
- *
+ *
* @since 7.2
*/
protected void onConnect(AtmosphereResponse response) {
@@ -342,7 +347,7 @@ public class AtmospherePushConnection implements PushConnection {
/**
* Called if the push connection fails. Atmosphere will automatically retry
* the connection until successful.
- *
+ *
*/
protected void onError(AtmosphereResponse response) {
state = State.DISCONNECTED;