@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { checkAttachment(ctx); setWritable(ctx, true); super.channelConnected(ctx, e); }
case CONNECTED: if (evt.getValue() != null) { channelConnected(ctx, evt); } else { channelDisconnected(ctx, evt);
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { connections.incrementAndGet(); totalConnections++; super.channelConnected(ctx, e); }
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { LOG.info("timer {} - connect took: {}ms", tag, String.format("%.2f", (System.nanoTime() - connectStart) / NANO_TO_MS)); connectContext.stop(); super.channelConnected(ctx, e); }
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { LOGGER.debug("Starting SSL/TLS client (Initiator) handshake."); sslHandler.handshake(); p.remove("sslHandshaker"); super.channelConnected(ctx, e); } });
@Override public void channelConnected(final ChannelHandlerContext ctx, final ChannelStateEvent e) throws Exception { super.channelConnected(ctx, e); channel = e.getChannel(); httpKeepAliveTask.registerKeepAliveHandler(this); }
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { channelLock.lock(); try { channel = e.getChannel(); if (!connecting) { LOG.info("Asked to disconnect from newly connected channel {}. Closing.", channel); channel.close(); return; } LOG.debug("Set channel to {}", channel); for (Message pending : reverse(pendingReply)) { LOG.debug("Sending pending message {} (channel connected)", pending); channel.write(pending); LOG.debug("Message {} written", pending); } setReady(true); connecting = false; channelConnected.signalAll(); } finally { channelLock.unlock(); } super.channelConnected(ctx, e); }
@Override public void channelConnected(final ChannelHandlerContext ctx, final ChannelStateEvent e) throws Exception { super.channelConnected(ctx, e); channel = e.getChannel(); if (httpClientIdleScanPeriod > 0) { task = new HttpIdleTimer(); java.util.concurrent.Future<?> future = scheduledThreadPool.scheduleAtFixedRate(task, httpClientIdleScanPeriod, httpClientIdleScanPeriod, TimeUnit.MILLISECONDS); task.setFuture(future); } }
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { if (DEBUG) { log.info("Channel connected: " + e.getChannel().toString()); } Channel channel = e.getChannel(); outgoingMessageQueue.addChannel(channel); super.channelConnected(ctx, e); }