Examples of pipeline()


Examples of cpw.mods.fml.common.network.FMLEmbeddedChannel.pipeline()

        }

        FMLEmbeddedChannel serverChannel = channelPair.get(Side.SERVER);
        serverChannel.attr(FMLOutboundHandler.FML_MESSAGETARGET).set(OutboundTarget.NOWHERE);
        String handlerName = serverChannel.findChannelHandlerNameForType(ForgeRuntimeCodec.class);
        serverChannel.pipeline().addAfter(handlerName, "ServerToClientConnection", new ServerToClientConnectionEstablishedHandler());
    }

    @SideOnly(Side.CLIENT)
    private static void addClientHandlers()
    {
View Full Code Here

Examples of io.netty.channel.Channel.pipeline()

      future.awaitUninterruptibly();

      if (future.isSuccess())
      {
         final Channel ch = future.channel();
         SslHandler sslHandler = ch.pipeline().get(SslHandler.class);
         if (sslHandler != null)
         {
            Future<Channel> handshakeFuture = sslHandler.handshakeFuture();
            if (handshakeFuture.awaitUninterruptibly(30000))
            {
View Full Code Here

Examples of io.netty.channel.Channel.pipeline()

            Future<Channel> handshakeFuture = sslHandler.handshakeFuture();
            if (handshakeFuture.awaitUninterruptibly(30000))
            {
               if (handshakeFuture.isSuccess())
               {
                  ChannelPipeline channelPipeline = ch.pipeline();
                  HornetQChannelHandler channelHandler = channelPipeline.get(HornetQChannelHandler.class);
                  channelHandler.active = true;
               }
               else
               {
View Full Code Here

Examples of io.netty.channel.Channel.pipeline()

            {
               // Send a HTTP GET + Upgrade request that will be handled by the http-upgrade handler.
               try
               {
                  //get this first incase it removes itself
                  HttpUpgradeHandler httpUpgradeHandler = (HttpUpgradeHandler) ch.pipeline().get("http-upgrade");
                  URI uri = new URI("http", null, host, port, null, null, null);
                  HttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, uri.getRawPath());
                  request.headers().set(HttpHeaders.Names.HOST, host);
                  request.headers().set(HttpHeaders.Names.UPGRADE, HORNETQ_REMOTING);
                  request.headers().set(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.UPGRADE);
View Full Code Here

Examples of io.netty.channel.Channel.pipeline()

                  return null;
               }
            }
            else
            {
               ChannelPipeline channelPipeline = ch.pipeline();
               HornetQChannelHandler channelHandler = channelPipeline.get(HornetQChannelHandler.class);
               channelHandler.active = true;
            }
         }
View Full Code Here

Examples of io.netty.channel.Channel.pipeline()

        }

        EventLoopGroup eventLoopGroup = process.getEventLoop().getEventLoopGroup();
        Channel channel = NioOutputStreamChannel.create(process, out);
        channel.config().setAutoRead(false);
        channel.pipeline().addLast( new DataEventHandler( process, handle ));
        eventLoopGroup.register(channel);

        return channel.newSucceededFuture();
    }
}
View Full Code Here

Examples of io.netty.channel.Channel.pipeline()

            InputStream in = System.in;
            EventLoopGroup eventLoopGroup = process.getEventLoop().getEventLoopGroup();

            Channel channel = NioInputStreamChannel.create(process, in);
            channel.config().setAutoRead(false);
            channel.pipeline().addLast( new DataEventHandler( process, handle ) );
            eventLoopGroup.register(channel);

            return channel.newSucceededFuture();
        }
View Full Code Here

Examples of io.netty.channel.Channel.pipeline()

                logger.debug("Using TLSv1.1");
            }

            engine.setUseClientMode(true);
            RiakSecurityDecoder decoder = new RiakSecurityDecoder(engine, username, password);
            c.pipeline().addFirst(decoder);
               
            try
            {
                DefaultPromise<Void> promise = decoder.getPromise();
                promise.await();
View Full Code Here

Examples of io.netty.channel.Channel.pipeline()

            // an exception if a connection can't be made.
            Channel c = doGetConnection();

            Promise<RiakMessage> promise;
           
            if (c.pipeline().names().contains(Constants.SSL_HANDLER))
            {
                c.pipeline().addAfter(Constants.SSL_HANDLER, Constants.HEALTHCHECK_CODEC, healthCheck);
            }
            else
            {
View Full Code Here

Examples of io.netty.channel.Channel.pipeline()

            Promise<RiakMessage> promise;
           
            if (c.pipeline().names().contains(Constants.SSL_HANDLER))
            {
                c.pipeline().addAfter(Constants.SSL_HANDLER, Constants.HEALTHCHECK_CODEC, healthCheck);
            }
            else
            {
                c.pipeline().addBefore(Constants.MESSAGE_CODEC, Constants.HEALTHCHECK_CODEC, healthCheck);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.