@Override public void channelActive(ChannelHandlerContext ctx) throws Exception { allChannels.add(ctx.channel()); NettyRpcServer.LOG.trace("Connection {}; # active connections={}", ctx.channel().remoteAddress(), (allChannels.size() - 1)); super.channelActive(ctx); }
@Override public void channelActive(ChannelHandlerContext ctx) throws Exception { super.channelActive(ctx); channelActivePromise.setSuccess(ctx.channel()); }
@Override public void channelActive(final ChannelHandlerContext ctx) throws Exception { super.channelActive(ctx); handshaker.handshake(ctx.channel()).addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { if (!future.isSuccess()) { ctx.fireExceptionCaught(future.cause()); } else { ctx.fireUserEventTriggered( WebSocketClientProtocolHandler.ClientHandshakeStateEvent.HANDSHAKE_ISSUED); } } }); }