Example usage for io.netty.channel ChannelHandlerContext fireChannelRegistered

List of usage examples for io.netty.channel ChannelHandlerContext fireChannelRegistered

Introduction

In this page you can find the example usage for io.netty.channel ChannelHandlerContext fireChannelRegistered.

Prototype

@Override
    ChannelHandlerContext fireChannelRegistered();

Source Link

Usage

From source file:org.apache.jackrabbit.oak.plugins.segment.NetworkErrorProxy.java

License:Apache License

@Override
public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
    final ChannelHandlerContext c = ctx;
    EventLoopGroup group = new NioEventLoopGroup();
    Bootstrap cb = new Bootstrap();
    cb.group(group);//from   w w w .j a  va2  s .co  m
    cb.channel(NioSocketChannel.class);

    cb.handler(new ChannelInitializer<SocketChannel>() {
        @Override
        public void initChannel(SocketChannel ch) throws Exception {
            SendBackHandler sbh = new SendBackHandler(c);
            if (ForwardHandler.this.flipPosition >= 0) {
                sbh = new BitFlipHandler(c, ForwardHandler.this.flipPosition);
            } else if (ForwardHandler.this.skipBytes > 0) {
                sbh = new SwallowingHandler(c, ForwardHandler.this.skipPosition, ForwardHandler.this.skipBytes);
            }
            ch.pipeline().addFirst(sbh);
        }
    });
    remote = cb.connect(this.targetHost, this.targetPort).sync();

    ctx.fireChannelRegistered();
}

From source file:org.opendaylight.controller.netconf.nettyutil.handler.ssh.virtualsocket.ChannelInputStream.java

License:Open Source License

public void channelRegistered(ChannelHandlerContext ctx) {
    ctx.fireChannelRegistered();
}

From source file:org.opendaylight.controller.netconf.util.handler.ssh.virtualsocket.ChannelInputStream.java

License:Open Source License

public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
    ctx.fireChannelRegistered();
}

From source file:sailfish.remoting.handler.HeartbeatChannelHandler.java

License:Apache License

@Override
public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
    if (ctx.channel().isActive()) {
        ctx.channel().attr(ChannelAttrKeys.lastReadTimeMillis).set(System.currentTimeMillis());
    }/*from  w  w w .  ja  v  a2 s .  co  m*/
    ctx.fireChannelRegistered();
}