aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-09-24 10:20:29 +0300
committerVaadin Code Review <review@vaadin.com>2015-09-24 08:50:05 +0000
commitca3c460cbd6edb801f7919d046a3323f5f8babf1 (patch)
treeea92827f99254f2fe6d02b2184c2b463b7f0cfc7 /client
parentc426c779a76168a8cb239b494ffa498960054f16 (diff)
downloadvaadin-framework-ca3c460cbd6edb801f7919d046a3323f5f8babf1.tar.gz
vaadin-framework-ca3c460cbd6edb801f7919d046a3323f5f8babf1.zip
Adds support for defining the URL to use for push requests (#18989)
Change-Id: I12afaf7e5c5c385f3a19c7dab60f044d8721e082
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/communication/AtmospherePushConnection.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
index 8276bf68bb..158638a5ec 100644
--- a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
+++ b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java
@@ -130,6 +130,11 @@ public class AtmospherePushConnection implements PushConnection {
*/
private Command pendingDisconnectCommand;
+ /**
+ * The url to use for push requests
+ */
+ private String url;
+
public AtmospherePushConnection() {
}
@@ -173,7 +178,12 @@ public class AtmospherePushConnection implements PushConnection {
config.setStringValue(param,
pushConfiguration.parameters.get(param));
}
-
+ if (pushConfiguration.pushUrl != null) {
+ url = pushConfiguration.pushUrl;
+ } else {
+ url = ApplicationConstants.APP_PROTOCOL_PREFIX
+ + ApplicationConstants.PUSH_PATH;
+ }
runWhenAtmosphereLoaded(new Command() {
@Override
public void execute() {
@@ -188,9 +198,7 @@ public class AtmospherePushConnection implements PushConnection {
}
private void connect() {
- String baseUrl = connection
- .translateVaadinUri(ApplicationConstants.APP_PROTOCOL_PREFIX
- + ApplicationConstants.PUSH_PATH);
+ String baseUrl = connection.translateVaadinUri(url);
String extraParams = UIConstants.UI_ID_PARAMETER + "="
+ connection.getConfiguration().getUIId();