Package org.jboss.netty.handler.execution

Examples of org.jboss.netty.handler.execution.ExecutionHandler


    // responsible for observing idle timeout - Netty
    pipeline.addLast("idleTimeout", new NettyIdleHandler(this.context, this.timer, 0, 0, this.context.getIdleTimeoutSeconds()));
    // responsible for reading until SCMP frame is complete
    pipeline.addLast("framer", new NettySCMPFrameDecoder());
    // executer to run NettyTcpRequesterResponseHandler in own thread
    pipeline.addLast("executor", new ExecutionHandler(AppContext.getSCWorkerThreadPool()));
    // responsible for handle response - Stabilit
    pipeline.addLast("requesterResponseHandler", new NettyTcpRequesterResponseHandler());
    return pipeline;
  }
View Full Code Here


    }

    public void run()
    {
        // Configure the server.
        executionHandler = new ExecutionHandler(new RequestThreadPoolExecutor());
        factory = new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool());
        ServerBootstrap bootstrap = new ServerBootstrap(factory);

        // Set up the event pipeline factory.
        bootstrap.setPipelineFactory(new PipelineFactory(this));
View Full Code Here

        pipeline.addLast("timeout", readTimeoutHandler);
        pipeline.addLast("handshaketimeout",
                         new HandshakeTimeoutHandler(handler, timer, 15));
        if (pipelineExecutor != null)
            pipeline.addLast("pipelineExecutor",
                             new ExecutionHandler(pipelineExecutor));
        pipeline.addLast("handler", handler);
        return pipeline;
    }
View Full Code Here

public class LocalServerPipelineFactory implements ChannelPipelineFactory {

    private final ExecutionHandler executionHandler;

    public LocalServerPipelineFactory(Executor eventExecutor) {
        executionHandler = new ExecutionHandler(eventExecutor);
    }
View Full Code Here

        cb.getPipeline().addFirst("ssl", new SslHandler(cse));
        cb.getPipeline().addLast("handler", ch);
        ExecutorService eventExecutor = null;
        if (isExecutorRequired()) {
            eventExecutor = new OrderedMemoryAwareThreadPoolExecutor(16, 0, 0);
            sb.getPipeline().addFirst("executor", new ExecutionHandler(eventExecutor));
            cb.getPipeline().addFirst("executor", new ExecutionHandler(eventExecutor));
        }

        Channel sc = sb.bind(new InetSocketAddress(0));
        int port = ((InetSocketAddress) sc.getLocalAddress()).getPort();
View Full Code Here

        Responder responder = new LilySpecificResponder(AvroLily.class, avroLily);

        ThreadFactory threadFactory = new CustomThreadFactory("avro-exechandler", new ThreadGroup("AvroExecHandler"));
        if (maxServerThreads == -1) {
            executorService = Executors.newCachedThreadPool(threadFactory);
            executionHandler = new ExecutionHandler(executorService);
        } else {
            executorService = new ThreadPoolExecutor(maxServerThreads / 3, maxServerThreads,
                    60, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(), threadFactory, new WaitPolicy());
            executionHandler = new ExecutionHandler(executorService);
        }

        //server = new HttpServer(responder, port);
        server = new NettyServer(responder, new InetSocketAddress(port), new NioServerSocketChannelFactory
                (Executors.newCachedThreadPool(), Executors.newCachedThreadPool()), executionHandler);
View Full Code Here

        this.protocol = protocol;
        this.secure = secure;
    }
   
    protected ExecutionHandler createExecutionHandler(int size) {
        return new ExecutionHandler(new OrderedMemoryAwareThreadPoolExecutor(size, 0, 0));
    }
View Full Code Here

    }

    public void run()
    {
        // Configure the server.
        executionHandler = new ExecutionHandler(new RequestThreadPoolExecutor());
        factory = new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool());
        ServerBootstrap bootstrap = new ServerBootstrap(factory);

        bootstrap.setOption("child.tcpNoDelay", true);
View Full Code Here

            isRunning.compareAndSet(true, false);
            return;
        }

        // Configure the server.
        executionHandler = new ExecutionHandler(new RequestThreadPoolExecutor());
        factory = new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool());
        ServerBootstrap bootstrap = new ServerBootstrap(factory);

        bootstrap.setOption("child.tcpNoDelay", true);
View Full Code Here

    }

    private void run()
    {
        // Configure the server.
        executionHandler = new ExecutionHandler(new RequestThreadPoolExecutor());
        factory = new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool());
        ServerBootstrap bootstrap = new ServerBootstrap(factory);

        bootstrap.setOption("child.tcpNoDelay", true);
        bootstrap.setOption("child.keepAlive", DatabaseDescriptor.getRpcKeepAlive());
View Full Code Here

TOP

Related Classes of org.jboss.netty.handler.execution.ExecutionHandler

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.