Package org.jboss.netty.util

Examples of org.jboss.netty.util.HashedWheelTimer


    this.password = password;
    this.executor = exec;
   
    this.proxySettings = proxy;

    timer = new HashedWheelTimer();
   
    channelFactory = new NioClientSocketChannelFactory(
        executor, 1, new NioWorkerPool(executor, DEFAULT_IO_THREADS), timer);

    boot = new ClientBootstrap(channelFactory);
View Full Code Here


        } else {
            clientBootstrap = new ClientBootstrap(new NioClientSocketChannelFactory(
                    Executors.newCachedThreadPool(daemonThreadFactory(settings, "transport_client_boss")),
                    bossCount,
                    new NioWorkerPool(Executors.newCachedThreadPool(daemonThreadFactory(settings, "transport_client_worker")), workerCount),
                    new HashedWheelTimer(daemonThreadFactory(settings, "transport_client_timer"))));
        }
        ChannelPipelineFactory clientPipelineFactory = new ChannelPipelineFactory() {
            @Override
            public ChannelPipeline getPipeline() throws Exception {
                ChannelPipeline pipeline = Channels.pipeline();
View Full Code Here

        String name = configBuilder.getNiftyName();

        String prefix = "nifty-client" + (Strings.isNullOrEmpty(name) ? "" : "-" + name);

        this.hashedWheelTimer = new HashedWheelTimer(renamingDaemonThreadFactory(prefix + "-timer-%s"));
        this.bossExecutor = newCachedThreadPool(renamingDaemonThreadFactory(prefix + "-boss-%s"));
        this.workerExecutor = newCachedThreadPool(renamingDaemonThreadFactory(prefix + "-worker-%s"));
        this.defaultSocksProxyAddress = defaultSocksProxyAddress;

        int bossThreadCount = configBuilder.getNiftyBossThreadCount();
View Full Code Here

        this(hello, handler, logger, readTimeout, null);
    }
   

    public ImapStreamChannelUpstreamHandler(final String hello, final ImapRequestStreamHandler handler, final Log logger, final long readTimeout, SSLEngine engine) {
        super(new HashedWheelTimer(), readTimeout, TimeUnit.SECONDS);
        this.logger = logger;
        this.hello = hello;
        this.handler = handler;
        this.engine = engine;
    }
View Full Code Here

    @Override
    protected ChannelPipelineFactory createPipelineFactory(final ChannelGroup group) {
        return new ChannelPipelineFactory() {
            private final ChannelGroupHandler groupHandler = new ChannelGroupHandler(group);
            private final HashedWheelTimer timer = new HashedWheelTimer();
           
            // Timeout of 30 minutes See rfc2060 5.4 for details
            private final static int TIMEOUT = 30 * 60;
           
            public ChannelPipeline getPipeline() throws Exception {
View Full Code Here

      final SocketAddress udpAddress) {

    tcpServer = new ServerBootstrap(new NioServerSocketChannelFactory(
        Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
    tcpServer.setPipelineFactory(new ChannelPipelineFactory() {
      private final HashedWheelTimer timer = new HashedWheelTimer();
      private final IdleStateHandler idleStateHandler = new IdleStateHandler(
          timer, 0, 0, idleTimeMilliSeconds, TimeUnit.MILLISECONDS);

      @Override
      public ChannelPipeline getPipeline() throws Exception {
View Full Code Here

            NettyClientConfigBuilder configBuilder,
            @Nullable InetSocketAddress defaultSocksProxyAddress)
    {
        this.configBuilder = configBuilder;

        this.hashedWheelTimer = new HashedWheelTimer(renamingDaemonThreadFactory("nifty-client-timer-%s"));
        this.bossExecutor = newCachedThreadPool(renamingDaemonThreadFactory("nifty-client-boss-%s"));
        this.workerExecutor = newCachedThreadPool(renamingDaemonThreadFactory("nifty-client-worker-%s"));
        this.defaultSocksProxyAddress = defaultSocksProxyAddress;

        int bossThreadCount = configBuilder.getNiftyBossThreadCount();
View Full Code Here

        String name = configBuilder.getNiftyName();

        String prefix = "nifty-client" + (Strings.isNullOrEmpty(name) ? "" : "-" + name);

        this.hashedWheelTimer = new HashedWheelTimer(renamingDaemonThreadFactory(prefix + "-timer-%s"));
        this.bossExecutor = newCachedThreadPool(renamingDaemonThreadFactory(prefix + "-boss-%s"));
        this.workerExecutor = newCachedThreadPool(renamingDaemonThreadFactory(prefix + "-worker-%s"));
        this.defaultSocksProxyAddress = defaultSocksProxyAddress;

        int bossThreadCount = configBuilder.getNiftyBossThreadCount();
View Full Code Here

        this(processor, new ThriftServerConfig());
    }

    public ThriftServer(TProcessor processor, ThriftServerConfig config)
    {
        this(processor, config, new HashedWheelTimer());
    }
View Full Code Here

    }

    @Override
    public ChannelPipeline getPipeline() throws Exception {
      ChannelPipeline pipeline = Channels.pipeline();
      Timer timer = new HashedWheelTimer();
      pipeline.addLast("timeout", new ReadTimeoutHandler(timer, 30));
      pipeline.addLast("codec", new HttpClientCodec());

      if (ssl) {
        SSLContext sslContext = SSLContext.getInstance("TLS");
View Full Code Here

TOP

Related Classes of org.jboss.netty.util.HashedWheelTimer

Copyright © 2018 www.massapicom. 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.