summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-03-19 09:49:32 +0000
committerVaadin Code Review <review@vaadin.com>2015-03-25 11:37:42 +0000
commit140844eaff3de1b926460081405eb7d53ec811f8 (patch)
tree22df06e4607937bbbb8b299beb05d6f4acb8de16 /server
parent1c569304b3f10960854c2045030d907408978d05 (diff)
downloadvaadin-framework-140844eaff3de1b926460081405eb7d53ec811f8.tar.gz
vaadin-framework-140844eaff3de1b926460081405eb7d53ec811f8.zip
Revert "Make push path configurable (#14432)."
Breaks long polling fallback when implemented this way This reverts commit 735f0748344d7ee594c4e52a715d867dfdb23cb1. Conflicts: push/build.xml push/ivy.xml server/src/com/vaadin/server/Constants.java uitest/src/com/vaadin/tests/push/PushPathTest.java Change-Id: I07f6fedafc648b0ee403865ccb322017d2a8d571
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/server/Constants.java3
-rw-r--r--server/src/com/vaadin/server/DefaultDeploymentConfiguration.java19
-rw-r--r--server/src/com/vaadin/server/DeploymentConfiguration.java10
-rw-r--r--server/src/com/vaadin/server/ServletPortletHelper.java3
-rw-r--r--server/src/com/vaadin/server/communication/UIInitHandler.java5
-rw-r--r--server/src/com/vaadin/ui/PushConfiguration.java47
-rw-r--r--server/tests/src/com/vaadin/server/AbstractDeploymentConfigurationTest.java4
-rw-r--r--server/tests/src/com/vaadin/tests/util/MockDeploymentConfiguration.java6
8 files changed, 6 insertions, 91 deletions
diff --git a/server/src/com/vaadin/server/Constants.java b/server/src/com/vaadin/server/Constants.java
index b7c2a1ff3e..f3cdd48d58 100644
--- a/server/src/com/vaadin/server/Constants.java
+++ b/server/src/com/vaadin/server/Constants.java
@@ -132,12 +132,11 @@ public interface Constants {
static final String SERVLET_PARAMETER_RESOURCE_CACHE_TIME = "resourceCacheTime";
static final String SERVLET_PARAMETER_HEARTBEAT_INTERVAL = "heartbeatInterval";
static final String SERVLET_PARAMETER_CLOSE_IDLE_SESSIONS = "closeIdleSessions";
+ static final String SERVLET_PARAMETER_PUSH_MODE = "pushMode";
static final String SERVLET_PARAMETER_UI_PROVIDER = "UIProvider";
static final String SERVLET_PARAMETER_LEGACY_PROPERTY_TOSTRING = "legacyPropertyToString";
static final String SERVLET_PARAMETER_SYNC_ID_CHECK = "syncIdCheck";
static final String SERVLET_PARAMETER_SENDURLSASPARAMETERS = "sendUrlsAsParameters";
- static final String SERVLET_PARAMETER_PUSH_MODE = "pushMode";
- static final String SERVLET_PARAMETER_PUSH_PATH = "pushPath";
// Configurable parameter names
static final String PARAMETER_VAADIN_RESOURCES = "Resources";
diff --git a/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java b/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java
index 5402979be8..b26e048431 100644
--- a/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java
+++ b/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java
@@ -61,13 +61,6 @@ public class DefaultDeploymentConfiguration extends
public static final boolean DEFAULT_SEND_URLS_AS_PARAMETERS = true;
- /**
- * Default value for {@link #getPushPath()} = {@value} .
- *
- * @since 7.4.1
- */
- public static final String DEFAULT_PUSH_PATH = "PUSH";
-
private final Properties initParameters;
private boolean productionMode;
private boolean xsrfProtectionEnabled;
@@ -292,18 +285,6 @@ public class DefaultDeploymentConfiguration extends
}
/**
- * {@inheritDoc}
- * <p>
- * The default path {@link DEFAULT_PUSH_PATH} can be changed by using init
- * parameter {@link Constants.SERVLET_PARAMETER_PUSH_PATH}.
- */
- @Override
- public String getPushPath() {
- return getApplicationOrSystemProperty(
- Constants.SERVLET_PARAMETER_PUSH_PATH, DEFAULT_PUSH_PATH);
- }
-
- /**
* Log a warning if Vaadin is not running in production mode.
*/
private void checkProductionMode() {
diff --git a/server/src/com/vaadin/server/DeploymentConfiguration.java b/server/src/com/vaadin/server/DeploymentConfiguration.java
index 06556e28a7..968ec7c0c3 100644
--- a/server/src/com/vaadin/server/DeploymentConfiguration.java
+++ b/server/src/com/vaadin/server/DeploymentConfiguration.java
@@ -195,7 +195,7 @@ public interface DeploymentConfiguration extends Serializable {
*
* @since 7.4
*
- * @return the name of the widgetset
+ * @return UI class name
*/
public String getWidgetset(String defaultValue);
@@ -214,14 +214,6 @@ public interface DeploymentConfiguration extends Serializable {
public String getClassLoaderName();
/**
- * Returns the push path configuration option value. Should never be null.
- *
- * @since 7.4.1
- * @return the path used with server push
- */
- public String getPushPath();
-
- /**
* Returns to legacy Property.toString() mode used. See
* {@link AbstractProperty#isLegacyToStringEnabled()} for more information.
*
diff --git a/server/src/com/vaadin/server/ServletPortletHelper.java b/server/src/com/vaadin/server/ServletPortletHelper.java
index 1f0c7f02b9..197d9fe416 100644
--- a/server/src/com/vaadin/server/ServletPortletHelper.java
+++ b/server/src/com/vaadin/server/ServletPortletHelper.java
@@ -124,8 +124,7 @@ public class ServletPortletHelper implements Serializable {
}
public static boolean isPushRequest(VaadinRequest request) {
- return hasPathPrefix(request, request.getService()
- .getDeploymentConfiguration().getPushPath() + '/');
+ return hasPathPrefix(request, ApplicationConstants.PUSH_PATH + '/');
}
public static void initDefaultUIProvider(VaadinSession session,
diff --git a/server/src/com/vaadin/server/communication/UIInitHandler.java b/server/src/com/vaadin/server/communication/UIInitHandler.java
index 02b4e64159..3a6dc1e55f 100644
--- a/server/src/com/vaadin/server/communication/UIInitHandler.java
+++ b/server/src/com/vaadin/server/communication/UIInitHandler.java
@@ -198,11 +198,10 @@ public abstract class UIInitHandler extends SynchronizedRequestHandler {
PushMode pushMode = provider.getPushMode(event);
if (pushMode == null) {
- pushMode = session.getConfiguration().getPushMode();
+ pushMode = session.getService().getDeploymentConfiguration()
+ .getPushMode();
}
ui.getPushConfiguration().setPushMode(pushMode);
- ui.getPushConfiguration().setPushPath(
- session.getConfiguration().getPushPath());
Transport transport = provider.getPushTransport(event);
if (transport != null) {
diff --git a/server/src/com/vaadin/ui/PushConfiguration.java b/server/src/com/vaadin/ui/PushConfiguration.java
index d5e89b4b14..90ad28542c 100644
--- a/server/src/com/vaadin/ui/PushConfiguration.java
+++ b/server/src/com/vaadin/ui/PushConfiguration.java
@@ -105,26 +105,6 @@ 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
@@ -278,32 +258,6 @@ 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
@@ -336,4 +290,5 @@ class PushConfigurationImpl implements PushConfiguration {
return Collections.unmodifiableCollection(getState(false).parameters
.keySet());
}
+
}
diff --git a/server/tests/src/com/vaadin/server/AbstractDeploymentConfigurationTest.java b/server/tests/src/com/vaadin/server/AbstractDeploymentConfigurationTest.java
index ccdbfea150..0518bea650 100644
--- a/server/tests/src/com/vaadin/server/AbstractDeploymentConfigurationTest.java
+++ b/server/tests/src/com/vaadin/server/AbstractDeploymentConfigurationTest.java
@@ -158,9 +158,5 @@ public class AbstractDeploymentConfigurationTest {
return DefaultDeploymentConfiguration.DEFAULT_SEND_URLS_AS_PARAMETERS;
}
- @Override
- public String getPushPath() {
- return null;
- }
}
}
diff --git a/server/tests/src/com/vaadin/tests/util/MockDeploymentConfiguration.java b/server/tests/src/com/vaadin/tests/util/MockDeploymentConfiguration.java
index 175dcb2b94..ddee23a9ec 100644
--- a/server/tests/src/com/vaadin/tests/util/MockDeploymentConfiguration.java
+++ b/server/tests/src/com/vaadin/tests/util/MockDeploymentConfiguration.java
@@ -22,7 +22,6 @@ public class MockDeploymentConfiguration extends
private LegacyProperyToStringMode legacyPropertyToStringMode = LegacyProperyToStringMode.DISABLED;
private boolean syncIdCheckEnabled = true;
private boolean sendUrlsAsParameters = true;
- private String pushPath = "PUSH";
@Override
public boolean isProductionMode() {
@@ -126,9 +125,4 @@ public class MockDeploymentConfiguration extends
return sendUrlsAsParameters;
}
- @Override
- public String getPushPath() {
- return pushPath;
- }
-
}