From 901bdc4a041e17560b99aa65267d77ec262ac011 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 24 Sep 2015 10:20:29 +0300 Subject: Adds support for defining the URL to use for push requests (#18989) Change-Id: I12afaf7e5c5c385f3a19c7dab60f044d8721e082 --- server/src/com/vaadin/ui/PushConfiguration.java | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'server') diff --git a/server/src/com/vaadin/ui/PushConfiguration.java b/server/src/com/vaadin/ui/PushConfiguration.java index 90ad28542c..d2c12afbe5 100644 --- a/server/src/com/vaadin/ui/PushConfiguration.java +++ b/server/src/com/vaadin/ui/PushConfiguration.java @@ -139,6 +139,29 @@ public interface PushConfiguration extends Serializable { */ public void setParameter(String parameter, String value); + /** + * Sets the URL to use for push requests. + *

+ * This is only used when overriding the URL to use. Setting this to null + * (the default) will use the default URL. + * + * @since + * @param pushUrl + * The push URL to use + */ + public void setPushUrl(String pushUrl); + + /** + * Returns the URL to use for push requests. + *

+ * This is only used when overriding the URL to use. Returns null (the + * default) when the default URL is used. + * + * @since + * @return the URL to use for push requests, or null to use to default + */ + public String getPushUrl(); + } class PushConfigurationImpl implements PushConfiguration { @@ -199,6 +222,16 @@ class PushConfigurationImpl implements PushConfiguration { } } + @Override + public void setPushUrl(String pushUrl) { + getState().pushUrl = pushUrl; + } + + @Override + public String getPushUrl() { + return getState(false).pushUrl; + } + /* * (non-Javadoc) * -- cgit v1.2.3