@Override protected void channelRead0( final @Nullable ChannelHandlerContext ctx, final @Nullable TransportedToProvider msg) throws Exception { assert ctx != null; assert msg != null; if (msg instanceof TransportedForExchange) { cd.receiveFromChannel(ctx, (TransportedForExchange) msg); } else { throw new IllegalArgumentException("Impossible case"); } }
@Override public void channelInactive(final @Nullable ChannelHandlerContext ctx) throws Exception { assert ctx != null; cd.deregisterChannel(ctx.channel()); }
/** * At that point we know the {@link Channel} is already active and the SSL handshake happened * (if it is enabled) */ @Override public void handlerAdded(final @Nullable ChannelHandlerContext ctx) throws Exception { assert ctx != null; cd.registerChannel(ctx.channel()); }