if (requestCycle.processRequestAndDetach())
protected boolean processRequestCycle(RequestCycle requestCycle, WebResponse webResponse, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, final FilterChain chain) throws IOException, ServletException { // Assume we are able to handle the request boolean res = true; if (requestCycle.processRequestAndDetach()) { webResponse.flush(); } else if (httpServletRequest.getPathInfo() != null && httpServletRequest.getPathInfo().equals(httpServletRequest.getAttribute(NOT_MOUNTED_PATH))) { throw new AbortWithHttpErrorCodeException(404, httpServletRequest.getPathInfo() + " is not mounted to any Page"); } else { if (chain != null) { httpServletRequest.setAttribute(NOT_MOUNTED_PATH, httpServletRequest.getPathInfo()); chain.doFilter(httpServletRequest, httpServletResponse); } res = false; } return res; } }
if (requestCycle.processRequestAndDetach())
@Override protected boolean processRequestCycle(final RequestCycle requestCycle, final WebResponse webResponse, final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse, final FilterChain chain) throws IOException, ServletException { // Assume we are able to handle the request boolean res = true; ThreadContext.setRequestCycle(requestCycle); if (acceptWebSocket(httpServletRequest, httpServletResponse) || httpServletResponse.isCommitted()) { res = true; } else if (requestCycle.processRequestAndDetach() || httpServletResponse.isCommitted()) { webResponse.flush(); } else { if (chain != null) { chain.doFilter(httpServletRequest, httpServletResponse); } res = false; } return res; }
protected boolean processRequestCycle(final RequestCycle requestCycle, final WebResponse webResponse, final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse, final FilterChain chain) throws IOException, ServletException { // Assume we are able to handle the request boolean res = true; ThreadContext.setRequestCycle(requestCycle); if (acceptWebSocket(httpServletRequest, httpServletResponse) || httpServletResponse.isCommitted()) { res = true; } else if (requestCycle.processRequestAndDetach() || httpServletResponse.isCommitted()) { webResponse.flush(); } else { if (chain != null) { chain.doFilter(httpServletRequest, httpServletResponse); } res = false; } return res; }
private void post(AtmosphereResource resource, PageKey pageKey, Collection<EventSubscription> subscriptionsForPage, AtmosphereEvent event) { String filterPath = WebApplication.get() .getWicketFilter() .getFilterConfig() .getInitParameter(WicketFilter.FILTER_MAPPING_PARAM); filterPath = filterPath.substring(1, filterPath.length() - 1); HttpServletRequest httpRequest = new HttpServletRequestWrapper(resource.getRequest()) { @Override public String getContextPath() { String ret = super.getContextPath(); return ret == null ? "" : ret; } }; AtmosphereWebRequest request = new AtmosphereWebRequest( (ServletWebRequest)application.newWebRequest(httpRequest, filterPath), pageKey, subscriptionsForPage, event); Response response = new AtmosphereWebResponse(resource.getResponse()); if (application.createRequestCycle(request, response).processRequestAndDetach()) broadcaster.broadcast(response.toString(), resource); }
private void post(AtmosphereResource resource, PageKey pageKey, Iterator<EventSubscription> subscriptionsForPage, AtmosphereEvent event) { String filterPath = WebApplication.get() .getWicketFilter() .getFilterConfig() .getInitParameter(WicketFilter.FILTER_MAPPING_PARAM); filterPath = filterPath.substring(1, filterPath.length() - 1); HttpServletRequest httpRequest = new HttpServletRequestWrapper(resource.getRequest()) { @Override public String getContextPath() { String ret = super.getContextPath(); return ret == null ? "" : ret; } }; AtmosphereWebRequest request = new AtmosphereWebRequest( (ServletWebRequest)application.newWebRequest(httpRequest, filterPath), pageKey, subscriptionsForPage, event); Response response = new AtmosphereWebResponse(resource.getResponse()); if (application.createRequestCycle(request, response).processRequestAndDetach()) getBroadcaster().broadcast(response.toString(), resource); }
if (!requestCycle.processRequestAndDetach())
if (!requestCycle.processRequestAndDetach())
requestCycle.processRequestAndDetach();
requestCycle.processRequestAndDetach();