public void destroy() { atmosphere.destroy(); }
@Override public void contextDestroyed(ServletContextEvent sce) { // Destroy any AtmosphereFramework instance we have initialized. // This must be done here to ensure that we cleanup Atmosphere instances // related to servlets which are never initialized ServletContext servletContext = sce.getServletContext(); Enumeration<String> attributeNames = servletContext.getAttributeNames(); while (attributeNames.hasMoreElements()) { String attributeName = attributeNames.nextElement(); if (isAtmosphereFrameworkAttribute(attributeName)) { Object value = servletContext.getAttribute(attributeName); if (value instanceof AtmosphereFramework) { // This might result in calling destroy() twice, once from // here and once from PushRequestHandler but // AtmosphereFramework.destroy() deals with that ((AtmosphereFramework) value).destroy(); } } } }
/** * Frees any resources currently in use. */ public void destroy() { atmosphere.destroy(); }
public AtmosphereCoordinator shutdown() { framework.destroy(); return this; }
/** * Frees any resources currently in use. */ public void destroy() { atmosphere.destroy(); }
@Override public void destroy() { framework.destroy(); }
public AtmosphereCoordinator shutdown() { framework.destroy(); return this; }
@Override public void shutdown() { try { framework.destroy(); } catch (Exception e) { // ignore } finally { super.shutdown(); } }
@Override public void shutdown() { try { framework.destroy(); } catch (Exception e) { // ignore } finally { super.shutdown(); } }
@Override public void shutdown() { try { framework.destroy(); } catch (Exception e) { // ignore } finally { super.shutdown(); } }
@Override public void shutdown() { try { framework.destroy(); } catch (Exception e) { // ignore } finally { super.shutdown(); } }
@Override public void shutdown() { try { framework.destroy(); } catch (Exception e) { // ignore } finally { super.shutdown(); } }
@Override public void shutdown() { try { framework.destroy(); } catch (Exception e) { // ignore } finally { super.shutdown(); } }
@Override public void stop() { Universe.framework().destroy(); }
@Override public void contextDestroyed(ServletContextEvent sce) { // Destroy any AtmosphereFramework instance we have initialized. // This must be done here to ensure that we cleanup Atmosphere instances // related to servlets which are never initialized ServletContext servletContext = sce.getServletContext(); Enumeration<String> attributeNames = servletContext.getAttributeNames(); while (attributeNames.hasMoreElements()) { String attributeName = attributeNames.nextElement(); if (isAtmosphereFrameworkAttribute(attributeName)) { Object value = servletContext.getAttribute(attributeName); if (value instanceof AtmosphereFramework) { // This might result in calling destroy() twice, once from // here and once from PushRequestHandler but // AtmosphereFramework.destroy() deals with that ((AtmosphereFramework) value).destroy(); } } } }
@Override public void contextDestroyed(ServletContextEvent sce) { // Destroy any AtmosphereFramework instance we have initialized. // This must be done here to ensure that we cleanup Atmosphere instances // related to servlets which are never initialized ServletContext servletContext = sce.getServletContext(); Enumeration<String> attributeNames = servletContext.getAttributeNames(); while (attributeNames.hasMoreElements()) { String attributeName = attributeNames.nextElement(); if (isAtmosphereFrameworkAttribute(attributeName)) { Object value = servletContext.getAttribute(attributeName); if (value instanceof AtmosphereFramework) { // This might result in calling destroy() twice, once from // here and once from PushRequestHandler but // AtmosphereFramework.destroy() deals with that ((AtmosphereFramework) value).destroy(); } } } } }
public void destroy() { isShutdown.set(true); if (framework != null) framework.destroy(); httpChannels.close(); websocketChannels.write(new CloseWebSocketFrame()); suspendTimer.shutdown(); }
public void destroy() { isShutdown.set(true); if (framework != null) framework.destroy(); httpChannels.close(); websocketChannels.write(new CloseWebSocketFrame()); suspendTimer.shutdown(); }
@Override public void onServletConfigAvailable(ServletConfig config) throws ServletException { // Very likely there is JSR-356 implementation available, let us reconfigure the Atmosphere framework // to use it since ServletConfig instance is already available. final Object container = config.getServletContext() .getAttribute("javax.websocket.server.ServerContainer"); if (container != null) { if (framework.initialized()) { framework.destroy(); } framework = create(getBus()); framework.addInitParameter(ApplicationConfig.PROPERTY_NATIVE_COMETSUPPORT, "false"); framework.addInitParameter(ApplicationConfig.WEBSOCKET_SUPPRESS_JSR356, "false"); framework.init(config); } }
@Override public void onServletConfigAvailable(ServletConfig config) throws ServletException { // Very likely there is JSR-356 implementation available, let us reconfigure the Atmosphere framework // to use it since ServletConfig instance is already available. final Object container = config.getServletContext() .getAttribute("javax.websocket.server.ServerContainer"); if (container != null) { if (framework.initialized()) { framework.destroy(); } framework = create(getBus()); framework.addInitParameter(ApplicationConfig.PROPERTY_NATIVE_COMETSUPPORT, "false"); framework.addInitParameter(ApplicationConfig.WEBSOCKET_SUPPRESS_JSR356, "false"); framework.init(config); } }