summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2016-08-11 18:28:46 +0300
committerArtur Signell <artur@vaadin.com>2016-08-12 09:49:01 +0000
commit2a5671438f7503610e627b16a2caff08409164d0 (patch)
tree07a84328a9e1d934fb75ac19e6a6203d7f00dcc5
parentbb9564db426d9d9471b6b07410d301fe1059ec19 (diff)
downloadvaadin-framework-2a5671438f7503610e627b16a2caff08409164d0.tar.gz
vaadin-framework-2a5671438f7503610e627b16a2caff08409164d0.zip
Update to latest Atmosphere (2.4.5) and JS (2.3.2)
Change-Id: I3569ed662bc93dd6861e40d8a4e0fa0b801551e6
-rw-r--r--pom.xml4
-rw-r--r--server/src/main/java/com/vaadin/server/Constants.java2
-rw-r--r--server/src/main/java/com/vaadin/server/communication/PushRequestHandler.java47
3 files changed, 25 insertions, 28 deletions
diff --git a/pom.xml b/pom.xml
index ee94fb829c..34d77fb510 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,8 +41,8 @@
<!-- Atmosphere versions -->
<!-- Note that this should be kept in sync with the class Constants -->
- <atmosphere.runtime.version>2.2.9.vaadin2</atmosphere.runtime.version>
- <atmosphere.js.version>2.2.13.vaadin5</atmosphere.js.version>
+ <atmosphere.runtime.version>2.4.5.vaadin1</atmosphere.runtime.version>
+ <atmosphere.js.version>2.3.2.vaadin1</atmosphere.js.version>
<!-- Dependency unpack directory -->
<dependency.unpack.directory>${project.build.directory}/dependency-unpack</dependency.unpack.directory>
diff --git a/server/src/main/java/com/vaadin/server/Constants.java b/server/src/main/java/com/vaadin/server/Constants.java
index 5efe6accb1..34decdfc16 100644
--- a/server/src/main/java/com/vaadin/server/Constants.java
+++ b/server/src/main/java/com/vaadin/server/Constants.java
@@ -67,7 +67,7 @@ public interface Constants {
+ "=================================================================";
// Keep the version number in sync with pom.xml
- static final String REQUIRED_ATMOSPHERE_RUNTIME_VERSION = "2.2.9.vaadin2";
+ static final String REQUIRED_ATMOSPHERE_RUNTIME_VERSION = "2.4.5.vaadin1";
static final String INVALID_ATMOSPHERE_VERSION_WARNING = "\n"
+ "=================================================================\n"
diff --git a/server/src/main/java/com/vaadin/server/communication/PushRequestHandler.java b/server/src/main/java/com/vaadin/server/communication/PushRequestHandler.java
index 84b81c8963..92329d9468 100644
--- a/server/src/main/java/com/vaadin/server/communication/PushRequestHandler.java
+++ b/server/src/main/java/com/vaadin/server/communication/PushRequestHandler.java
@@ -30,8 +30,8 @@ import org.atmosphere.cpr.AtmosphereFramework;
import org.atmosphere.cpr.AtmosphereFramework.AtmosphereHandlerWrapper;
import org.atmosphere.cpr.AtmosphereHandler;
import org.atmosphere.cpr.AtmosphereInterceptor;
-import org.atmosphere.cpr.AtmosphereRequest;
-import org.atmosphere.cpr.AtmosphereResponse;
+import org.atmosphere.cpr.AtmosphereRequestImpl;
+import org.atmosphere.cpr.AtmosphereResponseImpl;
import org.atmosphere.interceptor.HeartbeatInterceptor;
import org.atmosphere.util.VoidAnnotationProcessor;
@@ -58,8 +58,8 @@ import com.vaadin.shared.communication.PushConstants;
* @author Vaadin Ltd
* @since 7.1
*/
-public class PushRequestHandler implements RequestHandler,
- SessionExpiredHandler {
+public class PushRequestHandler
+ implements RequestHandler, SessionExpiredHandler {
private AtmosphereFramework atmosphere;
private PushHandler pushHandler;
@@ -82,30 +82,26 @@ public class PushRequestHandler implements RequestHandler,
atmosphere = getPreInitializedAtmosphere(vaadinServletConfig);
if (atmosphere == null) {
// Not initialized by JSR356WebsocketInitializer
- getLogger().fine(
- "Initializing Atmosphere for servlet "
- + vaadinServletConfig.getServletName());
+ getLogger().fine("Initializing Atmosphere for servlet "
+ + vaadinServletConfig.getServletName());
try {
atmosphere = initAtmosphere(vaadinServletConfig);
} catch (Exception e) {
- getLogger().log(
- Level.WARNING,
+ getLogger().log(Level.WARNING,
"Failed to initialize Atmosphere for "
+ service.getServlet().getServletName()
- + ". Push will not work.", e);
+ + ". Push will not work.",
+ e);
return;
}
} else {
- getLogger().fine(
- "Using pre-initialized Atmosphere for servlet "
- + vaadinServletConfig.getServletName());
+ getLogger().fine("Using pre-initialized Atmosphere for servlet "
+ + vaadinServletConfig.getServletName());
}
- pushHandler
- .setLongPollingSuspendTimeout(atmosphere
- .getAtmosphereConfig()
- .getInitParameter(
- com.vaadin.server.Constants.SERVLET_PARAMETER_PUSH_SUSPEND_TIMEOUT_LONGPOLLING,
- -1));
+ pushHandler.setLongPollingSuspendTimeout(
+ atmosphere.getAtmosphereConfig().getInitParameter(
+ com.vaadin.server.Constants.SERVLET_PARAMETER_PUSH_SUSPEND_TIMEOUT_LONGPOLLING,
+ -1));
for (AtmosphereHandlerWrapper handlerWrapper : atmosphere
.getAtmosphereHandlers().values()) {
AtmosphereHandler handler = handlerWrapper.atmosphereHandler;
@@ -124,7 +120,7 @@ public class PushRequestHandler implements RequestHandler,
* Create your own request handler and override this method if you want to
* customize the {@link PushHandler}, e.g. to dynamically decide the suspend
* timeout.
- *
+ *
* @since 7.6
* @param service
* the vaadin service
@@ -158,7 +154,7 @@ public class PushRequestHandler implements RequestHandler,
/**
* Initializes Atmosphere for the given ServletConfiguration
- *
+ *
* @since 7.5.0
* @param vaadinServletConfig
* The servlet configuration for the servlet which should have
@@ -244,9 +240,10 @@ public class PushRequestHandler implements RequestHandler,
return true;
}
try {
- atmosphere.doCometSupport(AtmosphereRequest
- .wrap((VaadinServletRequest) request),
- AtmosphereResponse
+ atmosphere.doCometSupport(
+ AtmosphereRequestImpl
+ .wrap((VaadinServletRequest) request),
+ AtmosphereResponseImpl
.wrap((VaadinServletResponse) response));
} catch (ServletException e) {
// TODO PUSH decide how to handle
@@ -266,7 +263,7 @@ public class PushRequestHandler implements RequestHandler,
/*
* (non-Javadoc)
- *
+ *
* @see
* com.vaadin.server.SessionExpiredHandler#handleSessionExpired(com.vaadin
* .server.VaadinRequest, com.vaadin.server.VaadinResponse)