@Override public void handle(Throwable event) { try { logger.debug("exceptionHandler", event); AsynchronousProcessor.class.cast(framework.getAsyncSupport()) .cancelled(r, res); } catch (IOException e) { logger.debug("", e); } catch (ServletException e) { logger.debug("", e); } } });
private void _close(AtmosphereRequest request) { AtmosphereResourceImpl r = AtmosphereResourceImpl.class.cast(request.resource()); if (request != null && r != null) { AsynchronousProcessor.class.cast(r.getAtmosphereConfig().framework().getAsyncSupport()).endRequest(r, true); } }
@Override public void configure(final AtmosphereConfig config) { framework = config.framework(); supportWebSocket = config.framework().getAsyncSupport().supportWebSocket(); config.properties().put(HeaderConfig.JSONP_CALLBACK_NAME, "c"); for (AtmosphereInterceptor i : framework.interceptors()) { if (HeartbeatInterceptor.class.isAssignableFrom(i.getClass())) { HeartbeatInterceptor.class.cast(i).paddingText("h".getBytes()).heartbeatFrequencyInSeconds(25); } } if (config.handlers().size() == 0) { framework.addAtmosphereHandler("/*", ECHO_ATMOSPHEREHANDLER); } }
/** * 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())); }
framework.excludeInterceptor(s); asynchronousProcessor = AsynchronousProcessor.class.cast(framework.getAsyncSupport()); maxWebSocketFrameSize = config.maxWebSocketFrameSize();
framework.excludeInterceptor(s); asynchronousProcessor = AsynchronousProcessor.class.cast(framework.getAsyncSupport()); maxWebSocketFrameSize = config.maxWebSocketFrameSize();