Package org.jboss.netty.bootstrap

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


        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


        bootstrap.setOption("child.keepAlive", true);
        serverChannel = new LinkedList<>();
        /* bind to one or more interfaces, if supplied, otherwise all */
        if (netif == null || netif.length == 0) {
            serverLocal = new InetSocketAddress(port);
            serverChannel.add(bootstrap.bind(serverLocal));
        } else {
            for (String net : netif) {
                NetworkInterface nicif = NetworkInterface.getByName(net);
                if (nicif == null) {
                    log.warn("missing speficied NIC: {}", net);
View Full Code Here

                    if (inAddr.getAddress().length != 4) {
                        log.trace("skip non-ipV4 address: {}", inAddr);
                        continue;
                    }
                    serverLocal = new InetSocketAddress(inAddr, port);
                    serverChannel.add(bootstrap.bind(serverLocal));
                }
                serverNetIf = net;
            }
        }
        if (autoMesh) {
View Full Code Here

    });

    logger.info("Syslog TCP Source starting...");

    if (host == null) {
      nettyChannel = serverBootstrap.bind(new InetSocketAddress(port));
    } else {
      nettyChannel = serverBootstrap.bind(new InetSocketAddress(host, port));
    }

    super.start();
View Full Code Here

    logger.info("Syslog TCP Source starting...");

    if (host == null) {
      nettyChannel = serverBootstrap.bind(new InetSocketAddress(port));
    } else {
      nettyChannel = serverBootstrap.bind(new InetSocketAddress(host, port));
    }

    super.start();
  }
View Full Code Here

    // Set up the event pipeline factory.
    bootstrap.setPipelineFactory(new HttpServerPipelineFactory(getHandler, fileReceiver, homeUrl));

    // Bind and start to accept incoming connections.
    Channel channel = bootstrap.bind(new InetSocketAddress(port));
    allChannels.add(channel);
    logger.msg("HTTP server initialised.", MyLogger.SEV_INFO);
  }

  public void shutdown()
View Full Code Here

        // Set up the event pipeline factory.
        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);
    }

    public void close()
    {
View Full Code Here

    });

    logger.info("Syslog TCP Source starting...");

    if (host == null) {
      nettyChannel = serverBootstrap.bind(new InetSocketAddress(port));
    } else {
      nettyChannel = serverBootstrap.bind(new InetSocketAddress(host, port));
    }

    super.start();
View Full Code Here

    logger.info("Syslog TCP Source starting...");

    if (host == null) {
      nettyChannel = serverBootstrap.bind(new InetSocketAddress(port));
    } else {
      nettyChannel = serverBootstrap.bind(new InetSocketAddress(host, port));
    }

    super.start();
  }
View Full Code Here

    });
    bootstrap.setOption("child.tcpNoDelay", true);
    bootstrap.setOption("child.keepAlive", true);
   
    // Listen to TCP port
    bootstrap.bind(new InetSocketAddress(port));

    LOG.info("Started listening to TCP requests at port " + port + " for "
        + rpcProgram + " with workerCount " + workerCount);
  }
}
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.