Package org.jboss.netty.bootstrap

Examples of org.jboss.netty.bootstrap.ServerBootstrap.bind()


                  new NioServerSocketChannelFactory(
                          this.bossExecutor,
                          this.workerExecutor));
          // Set up the event pipeline factory.
          bootstrap.setPipelineFactory(new StrestServerPipelineFactory(router, null));
      bootstrap.bind(new InetSocketAddress(this.port));
      this.bootstraps.add(bootstrap);
      System.out.println("Listening on port: " + this.port);
    }
    if (this.sslPort != null && this.sslContext != null) {
     
View Full Code Here


                  new NioServerSocketChannelFactory(
                          this.bossExecutor,
                          this.workerExecutor));
          // Set up the event pipeline factory.
          bootstrap.setPipelineFactory(new StrestServerPipelineFactory(router, sslContext));
      bootstrap.bind(new InetSocketAddress(this.sslPort));
      this.bootstraps.add(bootstrap);
      System.out.println("SSL listening on port: " + this.sslPort);
    }
   
    //add the flashsocket policy server, if needed
View Full Code Here

    } catch (Exception ex) {
      throw new RuntimeException(ex);
    }
    bootstrap.setPipelineFactory(pipelineFact);
    port = conf.getInt(SHUFFLE_PORT_CONFIG_KEY, DEFAULT_SHUFFLE_PORT);
    Channel ch = bootstrap.bind(new InetSocketAddress(port));
    accepted.add(ch);
    port = ((InetSocketAddress)ch.getLocalAddress()).getPort();
    conf.set(SHUFFLE_PORT_CONFIG_KEY, Integer.toString(port));
    pipelineFact.SHUFFLE.setPort(port);
    LOG.info(getName() + " listening on port " + port);
View Full Code Here

    bootstrap.setOption("child.tcpNoDelay", true);
    bootstrap.setOption("child.keepAlive", true);
    bootstrap.setOption("child.receiveBufferSize", 1024 * 64);
    bootstrap.setPipelineFactory(pipelineFactory);

    Channel serverChannel = bootstrap.bind(addr);
    allChannels.add(serverChannel);

    log.info("Listening on " + String.valueOf(addr.getHostName()) + ":" + addr.getPort());

    running = true;
View Full Code Here

        p.addLast("frameEncoder", new NettyFrameEncoder());
        p.addLast("handler", new NettyServerAvroHandler());
        return p;
      }
    });
    serverChannel = bootstrap.bind(addr);
    allChannels.add(serverChannel);
  }

  @Override
  public void start() {
View Full Code Here

      throw new RuntimeException(ex);
    }
    bootstrap.setPipelineFactory(pipelineFact);
    port = conf.getInt(ConfVars.PULLSERVER_PORT.varname,
        ConfVars.PULLSERVER_PORT.defaultIntVal);
    Channel ch = bootstrap.bind(new InetSocketAddress(port));
    accepted.add(ch);
    port = ((InetSocketAddress)ch.getLocalAddress()).getPort();
    conf.set(ConfVars.PULLSERVER_PORT.varname, Integer.toString(port));
    pipelineFact.PullServer.setPort(port);
    LOG.info(getName() + " listening on port " + port);
View Full Code Here

      throw new RuntimeException(ex);
    }
    bootstrap.setPipelineFactory(pipelineFact);
    port = conf.getInt(ConfVars.PULLSERVER_PORT.varname,
        ConfVars.PULLSERVER_PORT.defaultIntVal);
    Channel ch = bootstrap.bind(new InetSocketAddress(port));
    accepted.add(ch);
    port = ((InetSocketAddress)ch.getLocalAddress()).getPort();
    conf.set(ConfVars.PULLSERVER_PORT.varname, Integer.toString(port));
    pipelineFact.PullServer.setPort(port);
    LOG.info(getName() + " listening on port " + port);
View Full Code Here

    // Configure the server.
    ServerBootstrap bootstrap = new ServerBootstrap(new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
    // Set up the event pipeline factory.
    bootstrap.setPipelineFactory(new NettyEnginePipeLineFactory(this));
    // Bind and start to accept incoming connections.
    channel = bootstrap.bind(new InetSocketAddress(getConfiguration().getPort()));

    //set the timeout value if only it's greater than 0 in configuration
    if (getConfiguration().getTimeout() > 0) {
      channel.getConfig().setConnectTimeoutMillis(getConfiguration().getTimeout());
    }
View Full Code Here

            bootstrap.setPipelineFactory(new PipelineFactory(this));
        }

        // Bind and start to accept incoming connections.
        logger.info("Starting listening for CQL clients on {}...", socket);
        Channel channel = bootstrap.bind(socket);
        connectionTracker.allChannels.add(channel);
    }

    private void registerMetrics()
    {
View Full Code Here

            bootstrap.setPipelineFactory(new PipelineFactory(this));
        }

        // Bind and start to accept incoming connections.
        logger.info("Starting listening for CQL clients on {}...", socket);
        Channel channel = bootstrap.bind(socket);
        connectionTracker.allChannels.add(channel);
    }

    private void registerMetrics()
    {
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.