@Override protected void doSessionClosed(HttpAcceptSession session) throws Exception { SseSession sseSession = SSE_SESSION_KEY.remove(session); if (sseSession != null && !sseSession.isClosing()) { sseSession.reset(new IOException(LoggingUtils.EARLY_TERMINATION_OF_IOSESSION_MESSAGE).fillInStackTrace()); } IoFilterChain filterChain = session.getFilterChain(); removeBridgeFilters(filterChain); }
@Override protected void doSessionClosed(HttpAcceptSession session) throws Exception { WsebSession wsebSession = SESSION_KEY.remove(session); if (wsebSession != null && !wsebSession.isClosing()) { wsebSession.reset(new IOException(LoggingUtils.NETWORK_CONNECTIVITY_ERROR_MESSAGE).fillInStackTrace()); } IoFilterChain filterChain = session.getFilterChain(); removeBridgeFilters(filterChain); }
@Override protected void doSessionClosed(HttpAcceptSession session) throws Exception { if (wsebSession != null && (session.getStatus() != HttpStatus.SUCCESS_OK || wsebSession.getCloseException() != null)) { wsebSession.reset(new IOException(LoggingUtils.NETWORK_CONNECTIVITY_ERROR_MESSAGE, wsebSession.getAndClearCloseException()).fillInStackTrace()); } IoFilterChain filterChain = session.getFilterChain(); removeBridgeFilters(filterChain); }
@Override protected void doSessionOpened(HttpAcceptSession httpSession) throws Exception { IoFilterChain filterChain = httpSession.getFilterChain(); addBridgeFilters(filterChain); if (hasSessionId(httpSession)) { // avoid potential race between client reconnecting to SSE session after SSE session has closed // when SSE session closes, it unbinds the session-specific sub-path automatically, so // this generic "create" entry point receives the reconnect request instead // since the SSE session has already been closed, fail the reconnect attempt httpSession.setStatus(HttpStatus.CLIENT_NOT_FOUND); httpSession.close(false); return; } // create new session SseReconnectHandler reconnectHandler = createSession(httpSession); SseSession sseSession = reconnectHandler.sseSession; SSE_SESSION_KEY.set(httpSession, sseSession); // TODO: throw exception in HttpSession.setWriteHeader() after HttpSession writes headers reconnectHandler.sessionOpened(httpSession); }
IoFilterChain filterChain = session.getFilterChain(); filterChain.addFirst(CONTENT_LENGTH_ADJUSTMENT.filterName(), CONTENT_LENGTH_ADJUSTMENT.filter());
IoFilterChain bridgeFilterChain = session.getFilterChain();
IoFilterChain filterChain = session.getFilterChain();