Package org.jboss.netty.channel

Examples of org.jboss.netty.channel.ChannelPipeline


 
  @Override
  public ChannelPipeline getPipeline() throws Exception
  {
    // Create a default pipeline implementation.
    ChannelPipeline pipeline = pipeline();
    pipeline.addLast("idleStateCheck", new IdleStateHandler(timer, 0, 0,
        MAX_IDLE_SECONDS));
    pipeline.addLast("idleCheckHandler", idleCheckHandler);
    pipeline.addLast("multiplexer", createProtcolMultiplexerDecoder());
    return pipeline;
  }
View Full Code Here


 
  @Override
  public ChannelPipeline getPipeline() throws Exception
  {
    // Create a default pipeline implementation.
    ChannelPipeline pipeline = pipeline();
    addHandlers(pipeline);
    return pipeline;
  }
View Full Code Here

        bootstrap =
                new ServerBootstrap(factory);

        bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
            public ChannelPipeline getPipeline() {
                ChannelPipeline pipe =
                        Channels.pipeline(
                            new ObjectEncoder(),
                            new ObjectDecoder(Integer.MAX_VALUE, ClassResolvers.weakCachingConcurrentResolver(this
                                .getClass().getClassLoader())), new MasterConnectorHandler(masterNode));
                pipe.addLast("log", new LoggingHandler());
                return pipe;
            }
        });
       
        bootstrap.setOption("reuseAddress", true);
View Full Code Here

        bootstrap = new ClientBootstrap(factory);

        bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
            public ChannelPipeline getPipeline() {
                ChannelPipeline pipe =
                        Channels.pipeline(new ObjectEncoder(8192 * 4), new ObjectDecoder(Integer.MAX_VALUE,
                            ClassResolvers.weakCachingConcurrentResolver(this.getClass().getClassLoader())),
                            new SlaveConnectorHandler(responseQueue, slaveNode));
                pipe.addLast("log", new LoggingHandler());
                return pipe;
            }
        });

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

    private static class ClientPipelineFactory implements
               ChannelPipelineFactory {

  @Override
      public ChannelPipeline getPipeline() throws Exception {
      ChannelPipeline pipeline = Channels.pipeline();

      pipeline.addLast("codec", new HttpClientCodec());

      pipeline.addLast("aggregator", new HttpChunkAggregator(1048576));

      pipeline.addLast("handler", new TestResponseHandler());
      return pipeline;
  }
View Full Code Here

  private static class ClientPipelineFactory implements
      ChannelPipelineFactory {

    @Override
    public ChannelPipeline getPipeline() throws Exception {
      ChannelPipeline pipeline = Channels.pipeline();

      pipeline.addLast("codec", new HttpClientCodec());

      pipeline.addLast("aggregator", new HttpChunkAggregator(1048576));

      pipeline.addLast("handler", new TestResponseHandler());
      return pipeline;
    }
View Full Code Here

  private static class CountandraHttpServerPipelineFactory implements
      ChannelPipelineFactory {
    @Override
    public ChannelPipeline getPipeline() throws Exception {
      ChannelPipeline pipeline = Channels.pipeline();
      pipeline.addLast("decoder", new HttpRequestDecoder());
      pipeline.addLast("aggregator", new HttpChunkAggregator(1048576));
      pipeline.addLast("encoder", new HttpResponseEncoder());
      pipeline.addLast("handler", new CountandraHttpRequestHandler());
      return pipeline;
    }
View Full Code Here

        this.server = server;       
    }
   
    public ChannelPipeline getPipeline() throws Exception {
        // Create a default pipeline implementation.
        ChannelPipeline pipeline = Channels.pipeline();

        // Decoder
        pipeline.addLast("decoder", new MessageDecoder());
        // Encoder
        pipeline.addLast("encoder", new MessageEncoder());
        // business logic.
        pipeline.addLast("handler", new StormServerHandler(server));

        return pipeline;
    }
View Full Code Here

        this.client = client;       
    }

    public ChannelPipeline getPipeline() throws Exception {
        // Create a default pipeline implementation.
        ChannelPipeline pipeline = Channels.pipeline();

        // Decoder
        pipeline.addLast("decoder", new MessageDecoder());
        // Encoder
        pipeline.addLast("encoder", new MessageEncoder());
        // business logic.
        pipeline.addLast("handler", new StormClientErrorHandler(client.name()));

        return pipeline;
    }
View Full Code Here

        final CompacterHandler comHandler = new CompacterHandler(comGroup, state);
        comBootstrap.setPipelineFactory(new ChannelPipelineFactory() {

           @Override
           public ChannelPipeline getPipeline() throws Exception {
              ChannelPipeline pipeline = Channels.pipeline();
              pipeline.addLast("decoder", new ObjectDecoder());
              pipeline.addLast("encoder", new ObjectEncoder());
              pipeline.addLast("handler", comHandler);
              return pipeline;
           }
        });       
        comBootstrap.setOption("tcpNoDelay", false);
        comBootstrap.setOption("child.tcpNoDelay", false);
View Full Code Here

TOP

Related Classes of org.jboss.netty.channel.ChannelPipeline

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.