Package org.jboss.netty.bootstrap

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


    final ServerBootstrap airTunesRtspBootstrap = new ServerBootstrap(new NioServerSocketChannelFactory(ExecutorService, ExecutorService));
    airTunesRtspBootstrap.setPipelineFactory(new RaopRtspPipelineFactory());
    airTunesRtspBootstrap.setOption("reuseAddress", true);
    airTunesRtspBootstrap.setOption("child.tcpNoDelay", true);
    airTunesRtspBootstrap.setOption("child.keepAlive", true);
    s_allChannels.add(airTunesRtspBootstrap.bind(new InetSocketAddress(Inet4Address.getByName("0.0.0.0"), AirtunesServiceRTSPPort)));
        s_logger.info("Launched RTSP service on port " + AirtunesServiceRTSPPort);

      /* Create mDNS responders. */
        synchronized(s_jmDNSInstances) {
        for(final NetworkInterface iface: Collections.list(NetworkInterface.getNetworkInterfaces())) {
View Full Code Here


        );
      };
    });

    // Bind and start to accept incoming connections.
    bootstrap.bind(new InetSocketAddress("0.0.0.0", 8080));
    slog("Listening on 8080");
  }
}

View Full Code Here

        );
      };
    });

    // Bind and start to accept incoming connections.
    bootstrap.bind(new InetSocketAddress("0.0.0.0", 8080));
    // Telling the default logging to pipe down
    java.util.logging.LogManager.getLogManager().getLogger(DefaultChannelPipeline.class.getName()).setLevel(Level.SEVERE);
    slog("Listening on 8080");
  }
 
View Full Code Here

        new NioServerSocketChannelFactory(
            Executors.newCachedThreadPool(),
            Executors.newCachedThreadPool()));

    server.setPipelineFactory(new CountandraHttpServerPipelineFactory());
    server.bind(new InetSocketAddress(httpPort));

  }
 

  private static class CountandraHttpServerPipelineFactory implements
View Full Code Here

        // *** Start the Netty running ***

        // Create the monitor
        ThroughputMonitor monitor = new ThroughputMonitor(state);
        // Add the parent channel to the group
        Channel channel = bootstrap.bind(new InetSocketAddress(config.getPort()));
        channelGroup.add(channel);
       
        // Compacter handler
        ChannelFactory comFactory = new NioServerSocketChannelFactory(Executors.newCachedThreadPool(),
              Executors.newCachedThreadPool(), (Runtime.getRuntime().availableProcessors() * 2 + 1) * 2);
 
View Full Code Here

        comBootstrap.setOption("child.tcpNoDelay", false);
        comBootstrap.setOption("child.keepAlive", true);
        comBootstrap.setOption("child.reuseAddress", true);
        comBootstrap.setOption("child.connectTimeoutMillis", 100);
        comBootstrap.setOption("readWriteFair", true);
        channel = comBootstrap.bind(new InetSocketAddress(config.getPort() + 1));

        // Starts the monitor
        monitor.start();
        synchronized (lock) {
            while (!finish) {
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

            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 close()
    {
View Full Code Here

        bootstrap.setOption("keepAlive", isKeepAlive());

        try {
            logger.log(Level.INFO, "Binding to [" + getHost() + ":" + getPort() + "]...");

            Channel channel = bootstrap.bind(new InetSocketAddress(InetAddress.getByName(host), port));
            logger.log(Level.INFO, "Listening on [" + getHost() + ":" + getPort() + "].");
            channelGroup.add(channel);

        } catch (UnknownHostException e) {
            throw new JBNodeException("Unknown host '" + host + "'", e);
View Full Code Here

        bootstrap.setOption("child.tcpNoDelay", true);
        bootstrap.setOption("child.keepAlive", true);
        bootstrap.setOption("reuseAddress", true);

        // Bind and start to accept incoming connections.
        allChannels.add(bootstrap.bind(new InetSocketAddress(cfg.getProxyPort())));
        logger.info("Going into receive loop");
    }

    public void shutdown() {
        allChannels.close().awaitUninterruptibly();
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.