private void shutdownOutputRequested(TlsChildChannel tlsChildChannel, ChannelFuture tlsFuture) { SslHandler tlsHandler = transport.getPipeline().get(SslHandler.class); if (tlsChildChannel.isReadClosed()) { chainFutures(shutdownOutputOrClose(transport), tlsFuture); } else if (tlsHandler != null) { ChannelFuture tlsCloseFuture = tlsHandler.close(); tlsCloseFuture.addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { if (tlsChildChannel.setWriteClosed()) { fireOutputShutdown(tlsChildChannel); fireChannelDisconnected(tlsChildChannel); fireChannelUnbound(tlsChildChannel); fireChannelClosed(tlsChildChannel); } else { fireOutputShutdown(tlsChildChannel); } } }); tlsHandler.getSSLEngineInboundCloseFuture().addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { shutdownOutputOrClose(transport); } }); chainFutures(tlsCloseFuture, tlsFuture); } }
private void shutdownOutputRequested(TlsClientChannel tlsClientChannel, ChannelFuture tlsFuture) { SslHandler tlsHandler = transport.getPipeline().get(SslHandler.class); if (tlsClientChannel.isReadClosed()) { chainFutures(shutdownOutputOrClose(transport), tlsFuture); } else if (tlsHandler != null) { ChannelFuture tlsCloseFuture = tlsHandler.close(); tlsCloseFuture.addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { if (tlsClientChannel.setWriteClosed()) { fireOutputShutdown(tlsClientChannel); fireChannelDisconnected(tlsClientChannel); fireChannelUnbound(tlsClientChannel); fireChannelClosed(tlsClientChannel); } else { fireOutputShutdown(tlsClientChannel); } } }); tlsHandler.getSSLEngineInboundCloseFuture().addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { shutdownOutputOrClose(transport); } }); chainFutures(tlsCloseFuture, tlsFuture); } }
tlsChildConfig.setParameters(tlsEngine.getSSLParameters()); ChannelFuture tlsCloseFuture = handler.getSSLEngineInboundCloseFuture(); tlsCloseFuture.addListener(new ChannelFutureListener() { @Override