summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/PushConfiguration.java
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 /server/src/com/vaadin/ui/PushConfiguration.java
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 'server/src/com/vaadin/ui/PushConfiguration.java')
-rw-r--r--server/src/com/vaadin/ui/PushConfiguration.java47
1 files changed, 46 insertions, 1 deletions
diff --git a/server/src/com/vaadin/ui/PushConfiguration.java b/server/src/com/vaadin/ui/PushConfiguration.java
index 90ad28542c..d5e89b4b14 100644
--- a/server/src/com/vaadin/ui/PushConfiguration.java
+++ b/server/src/com/vaadin/ui/PushConfiguration.java
@@ -105,6 +105,26 @@ public interface PushConfiguration extends Serializable {
public void setFallbackTransport(Transport fallbackTransport);
/**
+ * Sets the path that is used with push.
+ *
+ * @since 7.4.1
+ * @param pushPath
+ * The path to be used with push
+ *
+ * @throws IllegalArgumentException
+ * if the argument is null or empty.
+ */
+ public void setPushPath(String pushPath);
+
+ /**
+ * Returns the path used with push.
+ *
+ * @since 7.4.1
+ * @return The path that is used with push
+ */
+ public String getPushPath();
+
+ /**
* Returns the given parameter, if set.
* <p>
* This method provides low level access to push parameters and is typically
@@ -258,6 +278,32 @@ class PushConfigurationImpl implements PushConfiguration {
/*
* (non-Javadoc)
*
+ * @see com.vaadin.ui.PushConfiguration#setPushPath(java.lang.String)
+ */
+ @Override
+ public void setPushPath(String pushPath) {
+ if (pushPath != null && !pushPath.isEmpty()) {
+ getState().pushPath = pushPath;
+ } else {
+ throw new IllegalArgumentException(
+ "Push path can't be empty or null");
+ }
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.PushConfiguration#getPushPath()
+ */
+ @Override
+ public String getPushPath() {
+ return getState(false).pushPath;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
* @see com.vaadin.ui.PushConfiguration#getParameter(java.lang.String)
*/
@Override
@@ -290,5 +336,4 @@ class PushConfigurationImpl implements PushConfiguration {
return Collections.unmodifiableCollection(getState(false).parameters
.keySet());
}
-
}