@SuppressWarnings({ "unchecked", "rawtypes" }) public void operationComplete(CloseFuture future) { // now connection should be closed log.debug("Close operation completed {}: {}", sessionId, future.isClosed()); future.removeListener(this); for (Object key : session.getAttributeKeys()) { Object obj = session.getAttribute(key); log.debug("{}: {}", key, obj); if (obj != null) { if (log.isTraceEnabled()) { log.trace("Attribute: {}", obj.getClass().getName()); } if (obj instanceof IoProcessor) { log.debug("Flushing session in processor"); ((IoProcessor) obj).flush(session); log.debug("Removing session from processor"); ((IoProcessor) obj).remove(session); } else if (obj instanceof IoBuffer) { log.debug("Clearing session buffer"); ((IoBuffer) obj).clear(); ((IoBuffer) obj).free(); } } } } };
@Override public void operationComplete(CloseFuture future) { // Note: a reference to the HTTP upstream session is pinned by listener // and must be removed to avoid a memory leak (see above) wsebCloseFuture.removeListener(listener); } });
public void operationComplete(CloseFuture future) { if (future.isClosed()) { log.debug("Connection is closed"); } else { log.debug("Connection is not yet closed"); } future.removeListener(this); }
public void operationComplete(CloseFuture future) { if (future.isClosed()) { log.debug("Connection is closed"); } else { log.debug("Connection is not yet closed"); } future.removeListener(this); }
public void operationComplete(CloseFuture future) { if (future.isClosed()) { log.debug("Connection is closed"); } else { log.debug("Connection is not yet closed"); } future.removeListener(this); }
public void operationComplete(CloseFuture future) { if (future.isClosed()) { log.debug("Connection is closed"); } else { log.debug("Connection is not yet closed"); } future.removeListener(this); }
public void operationComplete(CloseFuture future) { // now connection should be closed log.info("Close operation completed {}: {}", session.getId(), future.isClosed()); future.removeListener(this); }
public void operationComplete(CloseFuture future) { if (future.isClosed()) { log.info("Connection is closed: {}", getSessionId()); if (log.isTraceEnabled()) { log.trace("Session id - local: {} session: {}", getSessionId(), (String) ioSession.removeAttribute(RTMPConnection.RTMP_SESSION_ID)); } handler.connectionClosed(self); } else { log.debug("Connection is not yet closed"); } future.removeListener(this); } };
public void operationComplete(CloseFuture future) { if (future.isClosed()) { log.info("Connection is closed: {}", getSessionId()); if (log.isTraceEnabled()) { log.trace("Session id - local: {} session: {}", getSessionId(), (String) ioSession.removeAttribute(RTMPConnection.RTMP_SESSION_ID)); } handler.connectionClosed(self); } else { log.debug("Connection is not yet closed"); } future.removeListener(this); } };
void setRemoteSession(NamedPipeSession remoteSession) { if (remoteSession != null) { if (!this.remoteSession.compareAndSet(null, remoteSession)) { throw new NamedPipeException(String.format("Named pipe \"%s\" already attached to remote session", localAddress.getPipeName())); } if (!isClosing()) { getProcessor().updateTrafficControl(this); } remoteSession.getCloseFuture().addListener(closeOnFlush); } else { NamedPipeSession oldRemoteSession = this.remoteSession.getAndSet(null); if (oldRemoteSession != null) { oldRemoteSession.getCloseFuture().removeListener(closeOnFlush); // recursive call to detach peer (unless already done earlier in call stack) oldRemoteSession.setRemoteSession(null); if (!oldRemoteSession.isClosing() && !oldRemoteSession.isClosingOnFlush()) { oldRemoteSession.getProcessor().remove(oldRemoteSession); } } } }
IoSession take(HttpResourceAddress serverAddress) { IoSession transportSession = removeThreadAligned(serverAddress); if (transportSession != null) { // Got a cached persistent connection // Remove session idle tracking for this session transportSession.getConfig().setBothIdleTime(0); IoFilterChain filterChain = transportSession.getFilterChain(); if (filterChain.contains(IDLE_FILTER)) { filterChain.remove(IDLE_FILTER); } // Remove our CloseFuture listener as it is out of pool CloseFuture closeFuture = transportSession.getCloseFuture(); closeFuture.removeListener(closeListener); SERVER_ADDRESS.remove(transportSession); } return transportSession; }