Examples of MetricCollector


Examples of org.helios.netty.jmx.MetricCollector

  public Server(String iface, int port, String root) {
    LOG.info("Starting Netty-Ajax Server on [" + iface + ":" + port + "]");
    this.contentRoot = root;
    HttpStaticFileServerHandler.contentRoot = root;
    isock = new InetSocketAddress(iface, port);
    MetricCollector collector = MetricCollector.getInstance(5000);
    bossPool = ThreadPoolFactory.newCachedThreadPool(getClass().getPackage().getName(), "boss");
    workerPool =  ThreadPoolFactory.newCachedThreadPool(getClass().getPackage().getName(), "worker");
    pipelineFactory = new ServerPipelineFactory(getPipelineModifiers());
    ((ServerPipelineFactory)pipelineFactory).addModifier(collector.getName(), collector);
    channelFactory = new NioServerSocketChannelFactory(bossPool, workerPool);
    bstrap = new ServerBootstrap(channelFactory);
    bstrap.setPipelineFactory(pipelineFactory);
    bstrap.setOption("child.keepAlive", true);
    bstrap.bind(isock);
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.