/** * Notifies this Request that the container-initiated dispatch * during which ServletRequest#startAsync was called is about to * return to the container */ void onAfterService() throws IOException { if (asyncContext != null) { asyncContext.setOkToConfigure(false); if (asyncStarted.get()) { request.getResponse().getSuspendContext().setTimeout( asyncContext.getTimeout(), MILLISECONDS); } } else if (isUpgrade()) { if (httpUpgradeHandler != null) { final WebConnection wc = WebConnectionFactory.create( this, getInputStream(), servletResponse.getOutputStream()); httpUpgradeHandler.init(wc); } else { LOGGER.log(Level.SEVERE, "HttpUpgradeHandler handler cannot be null"); } } }
/** * Notifies this Request that the container-initiated dispatch * during which ServletRequest#startAsync was called is about to * return to the container */ void onAfterService() throws IOException { if (asyncContext != null) { asyncContext.setOkToConfigure(false); if (asyncStarted.get()) { request.getResponse().getSuspendContext().setTimeout( asyncContext.getTimeout(), MILLISECONDS); } } else if (isUpgrade()) { if (httpUpgradeHandler != null) { final WebConnection wc = WebConnectionFactory.create( this, getInputStream(), servletResponse.getOutputStream()); httpUpgradeHandler.init(wc); } else { LOGGER.log(Level.SEVERE, "HttpUpgradeHandler handler cannot be null"); } } }
/** * Notifies this Request that the container-initiated dispatch * during which ServletRequest#startAsync was called is about to * return to the container */ void onAfterService() throws IOException { if (asyncContext != null) { asyncContext.setOkToConfigure(false); if (asyncStarted.get()) { request.getResponse().getSuspendContext().setTimeout( asyncContext.getTimeout(), MILLISECONDS); } } else if (isUpgrade()) { if (httpUpgradeHandler != null) { final WebConnection wc = WebConnectionFactory.create( this, getInputStream(), servletResponse.getOutputStream()); httpUpgradeHandler.init(wc); } else { LOGGER.log(Level.SEVERE, "HttpUpgradeHandler handler cannot be null"); } } }
/** * Notifies this Request that the container-initiated dispatch * during which ServletRequest#startAsync was called is about to * return to the container */ void onAfterService() throws IOException { if (asyncContext != null) { asyncContext.setOkToConfigure(false); if (asyncStarted.get()) { request.getResponse().getSuspendContext().setTimeout( asyncContext.getTimeout(), MILLISECONDS); } } else if (isUpgrade()) { if (httpUpgradeHandler != null) { final WebConnection wc = WebConnectionFactory.create( this, getInputStream(), servletResponse.getOutputStream()); httpUpgradeHandler.init(wc); } else { LOGGER.log(Level.SEVERE, "HttpUpgradeHandler handler cannot be null"); } } }
/** * Notifies this Request that the container-initiated dispatch * during which ServletRequest#startAsync was called is about to * return to the container */ void onAfterService() throws IOException { if (asyncContext != null) { asyncContext.setOkToConfigure(false); if (asyncStarted.get()) { request.getResponse().getSuspendContext().setTimeout( asyncContext.getTimeout(), MILLISECONDS); } } else if (isUpgrade()) { if (httpUpgradeHandler != null) { final WebConnection wc = WebConnectionFactory.create( this, getInputStream(), servletResponse.getOutputStream()); httpUpgradeHandler.init(wc); } else { LOGGER.log(Level.SEVERE, "HttpUpgradeHandler handler cannot be null"); } } }
/** * Notifies this Request that the container-initiated dispatch * during which ServletRequest#startAsync was called is about to * return to the container */ void onAfterService() throws IOException { if (asyncContext != null) { asyncContext.setOkToConfigure(false); if (asyncStarted.get()) { request.getResponse().getSuspendContext().setTimeout( asyncContext.getTimeout(), MILLISECONDS); } } else if (isUpgrade()) { if (httpUpgradeHandler != null) { final WebConnection wc = WebConnectionFactory.create( this, getInputStream(), servletResponse.getOutputStream()); httpUpgradeHandler.init(wc); } else { LOGGER.log(Level.SEVERE, "HttpUpgradeHandler handler cannot be null"); } } }
httpUpgradeHandler.init((WebConnection) processor);
try { context.fireContainerEvent(ContainerEvent.BEFORE_UPGRADE_HANDLER_INITIALIZED, handler); handler.init(wc); } finally { context.fireContainerEvent(ContainerEvent.AFTER_UPGRADE_HANDLER_INITIALIZED, handler);