Examples of ExecutionHandler


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

          128 * 1024 * 1024
      );

      public ChannelPipeline getPipeline() throws Exception {
        return Channels.pipeline(
            new ExecutionHandler(executor),
            new ZMTP20Codec(new ZMTPSession(ZMTPConnectionType.Addressed, 1024, identity.getBytes(),
                                            ZMTPSocketType.REQ), false),
            new SimpleChannelUpstreamHandler() {

              @Override
View Full Code Here

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

        if (consumer.getConfiguration().isOrderedThreadPoolExecutor()) {
            // this must be added just before the ServerChannelHandler
            // use ordered thread pool, to ensure we process the events in order, and can send back
            // replies in the expected order. eg this is required by TCP.
            // and use a Camel thread factory so we have consistent thread namings
            ExecutionHandler executionHandler = new ExecutionHandler(consumer.getEndpoint().getComponent().getExecutorService());
            addToPipeline("executionHandler", channelPipeline, executionHandler);
            LOG.debug("Using OrderedMemoryAwareThreadPoolExecutor with core pool size: {}", consumer.getConfiguration().getMaximumPoolSize());
        }

        // our handler must be added last
View Full Code Here

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

        if (consumer.getConfiguration().isOrderedThreadPoolExecutor()) {
            // this must be added just before the HttpServerMultiplexChannelHandler
            // use ordered thread pool, to ensure we process the events in order, and can send back
            // replies in the expected order. eg this is required by TCP.
            // and use a Camel thread factory so we have consistent thread namings
            ExecutionHandler executionHandler = new ExecutionHandler(consumer.getEndpoint().getComponent().getExecutorService());
            pipeline.addLast("executionHandler", executionHandler);
            LOG.debug("Using OrderedMemoryAwareThreadPoolExecutor with core pool size: {}", consumer.getConfiguration().getMaximumPoolSize());
        }

        int port = consumer.getConfiguration().getPort();
View Full Code Here

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

    // responsible for encoding requests - Netty
    pipeline.addLast("encoder", new HttpRequestEncoder());
    // responsible for aggregate chunks - Netty
    pipeline.addLast("aggregator", new HttpChunkAggregator(Constants.MAX_HTTP_CONTENT_LENGTH));
    // executer to run NettyHttpRequesterResponseHandler in own thread
    pipeline.addLast("executor", new ExecutionHandler(AppContext.getThreadPool()));
    // responsible for handle responses - Stabilit
    pipeline.addLast("requesterResponseHandler", new NettyHttpRequesterResponseHandler());
    return pipeline;
  }
View Full Code Here

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.getThreadPool()));
    // responsible for handle response - Stabilit
    pipeline.addLast("requesterResponseHandler", new NettyTcpRequesterResponseHandler());
    return pipeline;
  }
View Full Code Here

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

    // responsible for encoding responses - Netty
    pipeline.addLast("encoder", new HttpResponseEncoder());
    // responsible for aggregate chunks - Netty
    pipeline.addLast("aggregator", new HttpChunkAggregator(Constants.MAX_HTTP_CONTENT_LENGTH));
    // executer to run NettyHttpResponderRequestHandler in own thread
    pipeline.addLast("executor", new ExecutionHandler(AppContext.getThreadPool()));
    // responsible for handle requests - Stabilit
    pipeline.addLast("handler", new NettyHttpResponderRequestHandler());
    return pipeline;
  }
View Full Code Here

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

    // responsible for encoding responses - Netty
    pipeline.addLast("encoder", new HttpResponseEncoder());
    // responsible for aggregate chunks - Netty
    pipeline.addLast("aggregator", new HttpChunkAggregator(Constants.MAX_HTTP_CONTENT_LENGTH));
    // executer to run NettyWebResponderRequestHandler in own thread
    pipeline.addLast("executor", new ExecutionHandler(AppContext.getThreadPool()));
    // responsible for handle requests - Stabilit
    pipeline.addLast("handler", new NettyWebResponderRequestHandler());
    return pipeline;
  }
View Full Code Here

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

    // logging handler
    pipeline.addFirst("logger", new LoggingHandler());
    // responsible for reading until SCMP frame is complete
    pipeline.addLast("framer", new NettySCMPFrameDecoder());
    // executer to run NettyTcpResponderRequestHandler in own thread
    pipeline.addLast("executor", new ExecutionHandler(AppContext.getThreadPool()));
    // responsible for handling request
    pipeline.addLast("handler", new NettyTcpResponderRequestHandler());
    return pipeline;
  }
View Full Code Here

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

    // responsible for encoding responses - Netty
    pipeline.addLast("encoder", new HttpResponseEncoder());
    // responsible for aggregate chunks - Netty
    pipeline.addLast("aggregator", new HttpChunkAggregator(Constants.MAX_HTTP_CONTENT_LENGTH));
    // executer to run NettyWebResponderRequestHandler in own thread
    pipeline.addLast("executor", new ExecutionHandler(AppContext.getSCWorkerThreadPool()));
    // responsible for handle requests - Stabilit
    pipeline.addLast("handler", new NettyWebResponderRequestHandler());
    return pipeline;
  }
View Full Code Here

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

  public ChannelPipeline getPipeline() throws Exception {
    ChannelPipeline pipeline = Channels.pipeline();
    // logging handler
    pipeline.addLast("logger", new LoggingHandler());
    // executer to run NettyTcpProxyResponderRequestHandler in own thread
    pipeline.addLast("executor", new ExecutionHandler(AppContext.getThreadPool()));
    // responsible for handle requests - Stabilit
    pipeline.addLast("handler", new NettyTcpProxyResponderRequestHandler(cf, remoteHost, remotePort));
    return pipeline;
  }
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.