@Override public boolean handleRequest(VaadinSession session, VaadinRequest request, VaadinResponse response) throws IOException { if (!ServletPortletHelper.isPushRequest(request)) { return false; } if (request instanceof VaadinServletRequest) { if (atmosphere == null) { response.sendError(500, "Atmosphere initialization failed. No push available."); return true; } try { atmosphere.doCometSupport( AtmosphereRequestImpl .wrap((VaadinServletRequest) request), AtmosphereResponseImpl .wrap((VaadinServletResponse) response)); } catch (ServletException e) { // TODO PUSH decide how to handle throw new RuntimeException(e); } } else { throw new IllegalArgumentException( "Portlets not currently supported"); } return true; }
public void handleNormalRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { try { framework.doCometSupport(AtmosphereRequestImpl.wrap(request), AtmosphereResponseImpl.wrap(response)); } catch (ServletException e) { throw new IOException(e); } }
public void handleNormalRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { try { framework.doCometSupport(AtmosphereRequestImpl.wrap(request), AtmosphereResponseImpl.wrap(response)); } catch (ServletException e) { throw new IOException(e); } }
@Override public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { framework.doCometSupport(AtmosphereRequestImpl.wrap(req), AtmosphereResponseImpl.wrap(res)); }
void service(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { this.queryMap = getQueryMap(request.getQueryString()); framework.doCometSupport(AtmosphereRequestImpl.wrap(request), AtmosphereResponseImpl.wrap(response)); }
@Override public void invoke(ServletConfig config, ServletContext context, HttpServletRequest req, HttpServletResponse resp) throws IOException { if (AtmosphereUtils.useAtmosphere(req)) { try { framework.doCometSupport(AtmosphereRequestImpl.wrap(req), AtmosphereResponseImpl.wrap(resp)); } catch (ServletException e) { throw new IOException(e); } return; } super.invoke(config, context, req, resp); }
@Override public void invoke(ServletConfig config, ServletContext context, HttpServletRequest req, HttpServletResponse resp) throws IOException { if (AtmosphereUtils.useAtmosphere(req)) { try { framework.doCometSupport(AtmosphereRequestImpl.wrap(req), AtmosphereResponseImpl.wrap(resp)); } catch (ServletException e) { throw new IOException(e); } return; } super.invoke(config, context, req, resp); }
@Override public boolean handleRequest(VaadinSession session, VaadinRequest request, VaadinResponse response) throws IOException { if (!ServletHelper.isRequestType(request, RequestType.PUSH)) { return false; } if (request instanceof VaadinServletRequest) { if (atmosphere == null) { response.sendError(500, "Atmosphere initialization failed. No push available."); return true; } try { atmosphere.doCometSupport( AtmosphereRequestImpl .wrap((VaadinServletRequest) request), AtmosphereResponseImpl .wrap((VaadinServletResponse) response)); } catch (ServletException e) { // TODO PUSH decide how to handle throw new RuntimeException(e); } } else { throw new IllegalArgumentException( "Only VaadinServletRequests are supported"); } return true; }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (AtmosphereUtils.useAtmosphere(request)) { try { framework.doCometSupport(AtmosphereRequestImpl.wrap(request), AtmosphereResponseImpl.wrap(response)); baseRequest.setHandled(true); } catch (ServletException e) { throw new IOException(e); } return; } super.handle(target, baseRequest, request, response); } }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (AtmosphereUtils.useAtmosphere(request)) { try { framework.doCometSupport(AtmosphereRequestImpl.wrap(request), AtmosphereResponseImpl.wrap(response)); baseRequest.setHandled(true); } catch (ServletException e) { throw new IOException(e); } return; } super.handle(target, baseRequest, request, response); } }
/** * Weblogic specific comet based implementation. * * @param rrk * @throws java.io.IOException * @throws javax.servlet.ServletException */ protected void doTimeout(RequestResponseKey rrk) throws IOException, ServletException { ((AsynchronousProcessor) framework.getAsyncSupport()).timedout(AtmosphereRequestImpl.wrap(rrk.getRequest()), AtmosphereResponseImpl.wrap(rrk.getResponse())); }
public void handleNormalRequest(HttpServerExchange undertowExchange) throws Exception { HttpServletResponseImpl response = new HttpServletResponseImpl(undertowExchange, (ServletContextImpl)servletContext); HttpServletRequestImpl request = new HttpServletRequestImpl(undertowExchange, (ServletContextImpl)servletContext); ServletRequestContext servletRequestContext = new ServletRequestContext(((ServletContextImpl)servletContext) .getDeployment(), request, response, null); undertowExchange.putAttachment(ServletRequestContext.ATTACHMENT_KEY, servletRequestContext); try { framework.doCometSupport(AtmosphereRequestImpl.wrap(request), AtmosphereResponseImpl.wrap(response)); } catch (ServletException e) { throw new IOException(e); } }
public void handleNormalRequest(HttpServerExchange undertowExchange) throws Exception { HttpServletResponseImpl response = new HttpServletResponseImpl(undertowExchange, (ServletContextImpl)servletContext); HttpServletRequestImpl request = new HttpServletRequestImpl(undertowExchange, (ServletContextImpl)servletContext); ServletRequestContext servletRequestContext = new ServletRequestContext(((ServletContextImpl)servletContext) .getDeployment(), request, response, null); undertowExchange.putAttachment(ServletRequestContext.ATTACHMENT_KEY, servletRequestContext); try { framework.doCometSupport(AtmosphereRequestImpl.wrap(request), AtmosphereResponseImpl.wrap(response)); } catch (ServletException e) { throw new IOException(e); } }
/** * Weblogic specific comet based implementation. * * @param rrk * @return true if suspended * @throws java.io.IOException * @throws javax.servlet.ServletException */ protected boolean doRequest(RequestResponseKey rrk) throws IOException, ServletException { try { rrk.getRequest().getSession().setAttribute(WebLogicCometSupport.RRK, rrk); Action action = framework.doCometSupport(AtmosphereRequestImpl.wrap(rrk.getRequest()), AtmosphereResponseImpl.wrap(rrk.getResponse())); if (action.type() == Action.TYPE.SUSPEND) { if (action.timeout() == -1) { rrk.setTimeout(Integer.MAX_VALUE); } else { rrk.setTimeout((int) action.timeout()); } } return action.type() == Action.TYPE.SUSPEND; } catch (IllegalStateException ex) { logger.error("AtmosphereServlet.doRequest exception", ex); throw ex; } }