public void cometClose() { coyoteRequest.action(ActionCode.COMET_CLOSE,getEvent()); }
public void cometClose() { coyoteRequest.action(ActionCode.COMET_CLOSE,getEvent()); }
public void cometClose() { coyoteRequest.action(ActionCode.COMET_CLOSE,getEvent()); }
public void cometClose() { coyoteRequest.action(ActionCode.COMET_CLOSE,getEvent()); setComet(false); }
public void cometClose() { coyoteRequest.action(ActionCode.COMET_CLOSE,getEvent()); setComet(false); }
public void cometClose() { coyoteRequest.action(ActionCode.COMET_CLOSE,getEvent()); setComet(false); }
public void sessionDestroyed(HttpSessionEvent se) { // Close all Comet connections associated with this session Request[] reqs = (Request[]) se.getSession().getAttribute(cometRequestsAttribute); if (reqs != null) { for (int i = 0; i < reqs.length; i++) { Request req = reqs[i]; try { req.getEvent().close(); } catch (Exception e) { req.getWrapper().getParent().getLogger().warn(MESSAGES.eventValveSessionListenerException(), e); } } } }
public void sessionDestroyed(HttpSessionEvent se) { // Close all Comet connections associated with this session Request[] reqs = (Request[]) se.getSession().getAttribute(cometRequestsAttribute); if (reqs != null) { for (int i = 0; i < reqs.length; i++) { Request req = reqs[i]; try { req.getEvent().close(); } catch (Exception e) { req.getWrapper().getParent().getLogger().warn(sm.getString( "cometConnectionManagerValve.listenerEvent"), e); } } } }
/** * Close the input buffer. * * @throws IOException An underlying IOException occurred */ public void close() throws IOException { if (request.getUpgradeHandler() != null && request.isEventMode()) { request.getEvent().close(); } else { closed = true; } }
public void lifecycleEvent(LifecycleEvent event) { if (event.getType() == Lifecycle.BEFORE_STOP_EVENT) { // FIXME: in that case, it could be useful to wait until end events are processed. Mmmm. // The container is getting stopped, close all current connections Iterator<Request> iterator = cometRequests.iterator(); while (iterator.hasNext()) { Request request = iterator.next(); // Remove the session tracking attribute as it isn't // serializable or required. HttpSession session = request.getSession(false); if (session != null) { try { session.removeAttribute(cometRequestsAttribute); } catch (IllegalStateException e) { // Ignore } } // Close the comet connection try { request.getEvent().close(); } catch (Exception e) { container.getLogger().warn(MESSAGES.eventValveExceptionDuringEvent(), e); } } cometRequests.clear(); } }
public void lifecycleEvent(LifecycleEvent event) { if (event.getType() == Lifecycle.BEFORE_STOP_EVENT) { // FIXME: in that case, it could be useful to wait until end events are processed. Mmmm. // The container is getting stopped, close all current connections Iterator<Request> iterator = cometRequests.iterator(); while (iterator.hasNext()) { Request request = iterator.next(); // Remove the session tracking attribute as it isn't // serializable or required. HttpSession session = request.getSession(false); if (session != null) { try { session.removeAttribute(cometRequestsAttribute); } catch (IllegalStateException e) { // Ignore } } // Close the comet connection try { request.getEvent().close(); } catch (Exception e) { container.getLogger().warn( sm.getString("cometConnectionManagerValve.event"), e); } } cometRequests.clear(); } }
@Override public void lifecycleEvent(LifecycleEvent event) { if (Lifecycle.BEFORE_STOP_EVENT.equals(event.getType())) { // The container is getting stopped, close all current connections Iterator<Request> iterator = cometRequests.iterator(); while (iterator.hasNext()) { Request request = iterator.next(); // Remove the session tracking attribute as it isn't // serializable or required. HttpSession session = request.getSession(false); if (session != null) { session.removeAttribute(cometRequestsAttribute); } // Close the comet connection try { CometEventImpl cometEvent = request.getEvent(); cometEvent.setEventType(CometEvent.EventType.END); cometEvent.setEventSubType( CometEvent.EventSubType.WEBAPP_RELOAD); getNext().event(request, request.getResponse(), cometEvent); cometEvent.close(); } catch (Exception e) { container.getLogger().warn( sm.getString("cometConnectionManagerValve.event"), e); } } cometRequests.clear(); } }
@Override public void lifecycleEvent(LifecycleEvent event) { if (Lifecycle.BEFORE_STOP_EVENT.equals(event.getType())) { // The container is getting stopped, close all current connections Iterator<Request> iterator = cometRequests.iterator(); while (iterator.hasNext()) { Request request = iterator.next(); // Remove the session tracking attribute as it isn't // serializable or required. HttpSession session = request.getSession(false); if (session != null) { session.removeAttribute(cometRequestsAttribute); } // Close the comet connection try { CometEventImpl cometEvent = request.getEvent(); cometEvent.setEventType(CometEvent.EventType.END); cometEvent.setEventSubType( CometEvent.EventSubType.WEBAPP_RELOAD); getNext().event(request, request.getResponse(), cometEvent); cometEvent.close(); } catch (Exception e) { container.getLogger().warn( sm.getString("cometConnectionManagerValve.event"), e); } } cometRequests.clear(); } }
@Override public void lifecycleEvent(LifecycleEvent event) { if (Lifecycle.BEFORE_STOP_EVENT.equals(event.getType())) { // The container is getting stopped, close all current connections Iterator<Request> iterator = cometRequests.iterator(); while (iterator.hasNext()) { Request request = iterator.next(); // Remove the session tracking attribute as it isn't // serializable or required. HttpSession session = request.getSession(false); if (session != null) { session.removeAttribute(cometRequestsAttribute); } // Close the comet connection try { CometEventImpl cometEvent = request.getEvent(); cometEvent.setEventType(CometEvent.EventType.END); cometEvent.setEventSubType( CometEvent.EventSubType.WEBAPP_RELOAD); getNext().event(request, request.getResponse(), cometEvent); cometEvent.close(); } catch (Exception e) { container.getLogger().warn( sm.getString("cometConnectionManagerValve.event"), e); } } cometRequests.clear(); } }
@Override public void sessionDestroyed(HttpSessionEvent se) { // Close all Comet connections associated with this session Request[] reqs = (Request[]) se.getSession().getAttribute(cometRequestsAttribute); if (reqs != null) { for (int i = 0; i < reqs.length; i++) { Request req = reqs[i]; try { CometEventImpl event = req.getEvent(); event.setEventType(CometEvent.EventType.END); event.setEventSubType(CometEvent.EventSubType.SESSION_END); ((CometProcessor) req.getWrapper().getServlet()).event(event); event.close(); } catch (Exception e) { req.getWrapper().getParent().getLogger().warn(sm.getString( "cometConnectionManagerValve.listenerEvent"), e); } } } }
@Override public void sessionDestroyed(HttpSessionEvent se) { // Close all Comet connections associated with this session Request[] reqs = (Request[]) se.getSession().getAttribute(cometRequestsAttribute); if (reqs != null) { for (int i = 0; i < reqs.length; i++) { Request req = reqs[i]; try { CometEventImpl event = req.getEvent(); event.setEventType(CometEvent.EventType.END); event.setEventSubType(CometEvent.EventSubType.SESSION_END); ((CometProcessor) req.getWrapper().getServlet()).event(event); event.close(); } catch (Exception e) { req.getWrapper().getParent().getLogger().warn(sm.getString( "cometConnectionManagerValve.listenerEvent"), e); } } } }
@Override public void sessionDestroyed(HttpSessionEvent se) { // Close all Comet connections associated with this session Request[] reqs = (Request[]) se.getSession().getAttribute(cometRequestsAttribute); if (reqs != null) { for (int i = 0; i < reqs.length; i++) { Request req = reqs[i]; try { CometEventImpl event = req.getEvent(); event.setEventType(CometEvent.EventType.END); event.setEventSubType(CometEvent.EventSubType.SESSION_END); ((CometProcessor) req.getWrapper().getServlet()).event(event); event.close(); } catch (Exception e) { req.getWrapper().getParent().getLogger().warn(sm.getString( "cometConnectionManagerValve.listenerEvent"), e); } } } }
@Override public void sessionDestroyed(HttpSessionEvent se) { // Close all Comet connections associated with this session Request[] reqs = (Request[]) se.getSession().getAttribute(cometRequestsAttribute); if (reqs != null) { for (int i = 0; i < reqs.length; i++) { Request req = reqs[i]; try { CometEventImpl event = req.getEvent(); event.setEventType(CometEvent.EventType.END); event.setEventSubType(CometEvent.EventSubType.SESSION_END); ((CometProcessor) req.getWrapper().getServlet()).event(event); event.close(); } catch (Exception e) { req.getWrapper().getParent().getLogger().warn(sm.getString( "cometConnectionManagerValve.listenerEvent"), e); } } } }
@Override public void sessionDestroyed(HttpSessionEvent se) { // Close all Comet connections associated with this session Request[] reqs = (Request[]) se.getSession().getAttribute(cometRequestsAttribute); if (reqs != null) { for (int i = 0; i < reqs.length; i++) { Request req = reqs[i]; try { CometEventImpl event = req.getEvent(); event.setEventType(CometEvent.EventType.END); event.setEventSubType(CometEvent.EventSubType.SESSION_END); ((CometProcessor) req.getWrapper().getServlet()).event(event); event.close(); } catch (Exception e) { req.getWrapper().getParent().getLogger().warn(sm.getString( "cometConnectionManagerValve.listenerEvent"), e); } } } }
@Override public void sessionDestroyed(HttpSessionEvent se) { // Close all Comet connections associated with this session ConnectionList list = (ConnectionList) se.getSession().getAttribute( cometRequestsAttribute); Request[] reqs = null; if (list != null) { reqs = list.get(); } if (reqs != null) { for (int i = 0; i < reqs.length; i++) { Request req = reqs[i]; try { CometEventImpl event = req.getEvent(); event.setEventType(CometEvent.EventType.END); event.setEventSubType(CometEvent.EventSubType.SESSION_END); ((CometProcessor) req.getWrapper().getServlet()).event(event); event.close(); } catch (Exception e) { req.getWrapper().getParent().getLogger().warn(sm.getString( "cometConnectionManagerValve.listenerEvent"), e); } } } }