@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { super.channelConnected(ctx, e); //To change body of overridden methods use File | Settings | File Templates. }
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { NettyTCPClient.ALL_CHANNELS.add(e.getChannel()); super.channelConnected(ctx, e); }
case CONNECTED: if (evt.getValue() != null) { channelConnected(ctx, evt); } else { channelDisconnected(ctx, evt);
@Override public void channelConnected(final ChannelHandlerContext ctx, final ChannelStateEvent e) throws Exception { super.channelConnected(ctx, e); }
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { super.channelConnected(ctx, e); }
@Override public void channelConnected(ChannelHandlerContext c, ChannelStateEvent e) throws Exception { if (startTime < 0) { startTime = System.currentTimeMillis(); } super.channelConnected(c, e); }
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { if (channelGroup != null) channelGroup.add(e.getChannel()); super.channelConnected(ctx, e); }
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { logger.info("Channel {} connected to {}", e.getChannel(), e.getChannel().getRemoteAddress()); super.channelConnected(ctx, e); }
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { ctx.setAttachment(ConnectionManager.getInstance().newConnection(ctx)); // logger.info(ctx + " connected"); super.channelConnected(ctx, e); }
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { super.channelConnected(ctx, e); channelGroup.add(ctx.getChannel()); logger.info("client:{} was connected.", ctx.getChannel().getRemoteAddress()); }
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { if (getChannels().size() > 2) { // 2 b/c one is the server channel throw new RuntimeException("Only one slave is currently supported! - " + new ArrayList<Channel>(getChannels())); } final InetAddress remoteAddress = ((InetSocketAddress) ctx.getChannel().getRemoteAddress()).getAddress(); if (getCluster().getNodesByProperty(IP_ADDRESS, remoteAddress).isEmpty()) { LOG.warn("An attempt to connect from an unrecognized address {}. No registered cluster node has this address.", remoteAddress); ctx.getChannel().close(); return; } replIters.put(ctx.getChannel(), backup.iterOwned()); synchronized (replIters) { replIters.notify(); } super.channelConnected(ctx, e); }
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { context.getWorkers().put(ctx.getChannel(), new MasterWorkerHolder(ctx.getChannel())); Channel channel=ctx.getChannel(); SocketAddress addr=channel.getRemoteAddress(); SocketLog.info("worker connected , :"+addr.toString()); super.channelConnected(ctx, e); } @Override
super.channelConnected(ctx, e);
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { super.channelConnected(ctx, e); NiftyConnectionContext context = new NiftyConnectionContext(); context.setRemoteAddress(ctx.getChannel().getRemoteAddress()); ctx.setAttachment(context); }
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { final Channel channel = ctx.getChannel(); final String name = cluster.getMyNodeInfo().getName(); LOG.debug("Writing node name, {}, to channel.", name); final byte[] array = name.getBytes(Charsets.UTF_8); final ChannelBuffer message = ChannelBuffers.wrappedBuffer(array); ctx.sendDownstream(new DownstreamMessageEvent(channel, new DefaultChannelFuture(channel, false), message, null)); super.channelConnected(ctx, e); ctx.getPipeline().remove(this); } }
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { try (Closeable closeable = IMAPMDCContext.from(ctx, attributes)) { InetSocketAddress address = (InetSocketAddress) ctx.getChannel().getRemoteAddress(); LOGGER.info("Connection established from {}", address.getAddress().getHostAddress()); imapConnectionsMetric.increment(); ImapResponseComposer response = new ImapResponseComposerImpl(new ChannelImapResponseWriter(ctx.getChannel())); ctx.setAttachment(response); // write hello to client response.untagged().message("OK").message(hello).end(); super.channelConnected(ctx, e); } }