@Override protected final void remove0(T session) { sessionMap.remove(getUniqueAddress(session)); // KG-3458: must make sure parent.close gets done before fireSessionDestroyed to avoid possible hang which // can happen because fireSessionDestroyed for a wsnSession unbinds the HTTP accept for the revalidate handler. // If that's the last nio (tcp) level bind it will call IoServiceListenerSupport.fireServiceDeactivated which // cannot complete until all sessions are closed (including our parent session!) // do any internal remove handling try { removeInternal(session); } finally { doFireSessionDestroyed(session); } }
@Override protected final void flush0(T session) { flushInternal(session); }
break; Object message = getMessageFromWriteRequest(session, request); if (message instanceof IoBufferEx) { IoBufferEx buf = (IoBufferEx) message; WriteFuture flushFuture = flushNow(session, parent, buf, filterChain, request); if (flushFuture == null) { break; if ( shouldAccountForWrittenBytes(session)) { session.increaseWrittenBytes(written, System.currentTimeMillis());
@Override protected void add0(T session) { SocketAddress clientAddress = getUniqueAddress(session); sessionMap.putIfAbsent(clientAddress, session); }
protected static WriteFuture flushNowInternal(IoSessionEx parent, Object message, IoBufferEx resetBuf, IoFilterChain filterChain, WriteRequest request) { WriteFuture parentFuture = parent.write(message); attachMessageSentInternal(filterChain, resetBuf, request, parentFuture); return parentFuture; }
protected WriteFuture flushNow(T session, IoSessionEx parent, IoBufferEx buf, IoFilterChain filterChain, WriteRequest request) { IoBufferAllocatorEx<?> parentAllocator = parent.getBufferAllocator(); IoBufferEx parentBuf = parentAllocator.wrap(buf.buf(), buf.flags()); return flushNowInternal(parent, parentBuf, buf, filterChain, request); }