diff options
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/com/vaadin/server/communication/PushHandler.java | 23 | ||||
-rw-r--r-- | server/src/com/vaadin/server/communication/PushRequestHandler.java | 4 |
2 files changed, 8 insertions, 19 deletions
diff --git a/server/src/com/vaadin/server/communication/PushHandler.java b/server/src/com/vaadin/server/communication/PushHandler.java index 39481db46a..de4987a99a 100644 --- a/server/src/com/vaadin/server/communication/PushHandler.java +++ b/server/src/com/vaadin/server/communication/PushHandler.java @@ -30,8 +30,8 @@ import org.json.JSONException; import com.vaadin.server.LegacyCommunicationManager.InvalidUIDLSecurityKeyException; import com.vaadin.server.ServiceException; import com.vaadin.server.SessionExpiredException; -import com.vaadin.server.VaadinRequest; -import com.vaadin.server.VaadinService; +import com.vaadin.server.VaadinServletRequest; +import com.vaadin.server.VaadinServletService; import com.vaadin.server.VaadinSession; import com.vaadin.ui.UI; @@ -43,9 +43,9 @@ import com.vaadin.ui.UI; */ public class PushHandler implements AtmosphereHandler { - private VaadinService service; + private VaadinServletService service; - public PushHandler(VaadinService service) { + public PushHandler(VaadinServletService service) { this.service = service; } @@ -53,7 +53,8 @@ public class PushHandler implements AtmosphereHandler { public void onRequest(AtmosphereResource resource) { AtmosphereRequest req = resource.getRequest(); - VaadinRequest vaadinRequest = getVaadinRequest(req); + VaadinServletRequest vaadinRequest = new VaadinServletRequest(req, + service); VaadinSession session; try { @@ -166,18 +167,6 @@ public class PushHandler implements AtmosphereHandler { public void destroy() { } - private VaadinRequest getVaadinRequest(AtmosphereRequest req) { - while (req.getRequest() instanceof AtmosphereRequest) { - req = (AtmosphereRequest) req.getRequest(); - } - if (req.getRequest() instanceof VaadinRequest) { - return (VaadinRequest) req.getRequest(); - } else { - throw new IllegalArgumentException( - "Request does not wrap VaadinRequest"); - } - } - private static final Logger getLogger() { return Logger.getLogger(PushHandler.class.getName()); } diff --git a/server/src/com/vaadin/server/communication/PushRequestHandler.java b/server/src/com/vaadin/server/communication/PushRequestHandler.java index 10ef16e11c..4f56c0b6a3 100644 --- a/server/src/com/vaadin/server/communication/PushRequestHandler.java +++ b/server/src/com/vaadin/server/communication/PushRequestHandler.java @@ -29,9 +29,9 @@ import com.vaadin.server.RequestHandler; import com.vaadin.server.ServletPortletHelper; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinResponse; -import com.vaadin.server.VaadinService; import com.vaadin.server.VaadinServletRequest; import com.vaadin.server.VaadinServletResponse; +import com.vaadin.server.VaadinServletService; import com.vaadin.server.VaadinSession; /** @@ -47,7 +47,7 @@ public class PushRequestHandler implements RequestHandler { private AtmosphereFramework atmosphere; private PushHandler pushHandler; - public PushRequestHandler(VaadinService service) { + public PushRequestHandler(VaadinServletService service) { atmosphere = new AtmosphereFramework(); |