Examples of NioClientSocketChannelFactory


Examples of com.facebook.presto.jdbc.internal.netty.channel.socket.nio.NioClientSocketChannelFactory

        String namePrefix = "http-client-" + name;

        // shared timer for channel factory and read timeout channel handler
        this.timer = new HashedWheelTimer(daemonThreadsNamed(namePrefix + "-timer-%s"));

        ChannelFactory channelFactory = new NioClientSocketChannelFactory(ioPool.getBossPool(), ioPool.getWorkerPool());

        ThreadFactory workerThreadFactory = daemonThreadsNamed(namePrefix + "-worker-%s");
        this.executor = new OrderedMemoryAwareThreadPoolExecutor(asyncConfig.getWorkerThreads(), 0, 0, 30, TimeUnit.SECONDS, workerThreadFactory);
        this.executorMBean = new ThreadPoolExecutorMBean(executor);
View Full Code Here

Examples of io.netty.channel.socket.nio.NioClientSocketChannelFactory

        boolean ssl = scheme.equalsIgnoreCase("https");

        // Configure the client.
        ClientBootstrap bootstrap = new ClientBootstrap(
                new NioClientSocketChannelFactory(
                        Executors.newCachedThreadPool(),
                        Executors.newCachedThreadPool()));

        // Set up the event pipeline factory.
        bootstrap.setPipelineFactory(new HttpSnoopClientPipelineFactory(ssl));
View Full Code Here

Examples of org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketChannelFactory

        // Bind and start to accept incoming connections.
        serverBootstrap.bind(new InetSocketAddress(9000));

        ClientBootstrap clientBootstrap = new ClientBootstrap(
                new NioClientSocketChannelFactory(
                        Executors.newCachedThreadPool(),
                        Executors.newCachedThreadPool()));

//        ClientBootstrap clientBootstrap = new ClientBootstrap(
//                new OioClientSocketChannelFactory(Executors.newCachedThreadPool()));
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory

     * @param port    Server port.
     */
    public RedisClient(String host, int port) {
        ExecutorService connectors = Executors.newFixedThreadPool(1);
        ExecutorService workers    = Executors.newCachedThreadPool();
        ClientSocketChannelFactory factory = new NioClientSocketChannelFactory(connectors, workers);

        InetSocketAddress addr = new InetSocketAddress(host, port);

        bootstrap = new ClientBootstrap(factory);
        bootstrap.setOption("remoteAddress", addr);
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory

            throw new IllegalArgumentException("count must be a positive integer.");
        }

        // Configure the client.
        ClientBootstrap bootstrap = new ClientBootstrap(
                new NioClientSocketChannelFactory(
                        Executors.newCachedThreadPool(),
                        Executors.newCachedThreadPool()));

        // Set up the event pipeline factory.
        bootstrap.setPipelineFactory(new FactorialClientPipelineFactory(count));
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory

        boolean ssl = scheme.equalsIgnoreCase("https");

        // Configure the client.
        ClientBootstrap bootstrap = new ClientBootstrap(
                new NioClientSocketChannelFactory(
                        Executors.newCachedThreadPool(),
                        Executors.newCachedThreadPool()));

        // Set up the event pipeline factory.
        bootstrap.setPipelineFactory(new HttpClientPipelineFactory(ssl));
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory

 
    final ExecutorService executor = Executors.newCachedThreadPool();

    // Configure the client.
    ClientBootstrap bootstrap = new ClientBootstrap(
            new NioClientSocketChannelFactory(
                executor,
                executor));

    bootstrap.setOption(
            "remoteAddress", new InetSocketAddress("localhost", 8080));
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory

        }
      }
      else
      {
          ClientBootstrap bootstrap = new ClientBootstrap(
                  new NioClientSocketChannelFactory(
                      executor,
                      executor));
         
          HessianProxyFactory factory = new HessianProxyFactory(executor, host.getName()+":"+host.getPort());
          bootstrap.setPipelineFactory(
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory

        }
      }
      else
      {
          ClientBootstrap bootstrap = new ClientBootstrap(
                  new NioClientSocketChannelFactory(
                      executor,
                      executor));
         
          HessianProxyFactory factory = new HessianProxyFactory(executor, host.getName()+":"+host.getPort());
          bootstrap.setPipelineFactory(
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory

  {
    String host = args[0];
    int port = Integer.parseInt(args[1]);
   
    ChannelFactory factory =
            new NioClientSocketChannelFactory(
                    Executors.newCachedThreadPool(),
                    Executors.newCachedThreadPool());

        bootstrap = new ClientBootstrap(factory);
        bootstrap.setOption(
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.