Package org.jboss.netty.channel

Examples of org.jboss.netty.channel.ChannelPipelineFactory


    allChannels = new DefaultChannelGroup("jmemcachedChannelGroup");

    ServerBootstrap bootstrap = new ServerBootstrap(channelFactory);

    ChannelPipelineFactory pipelineFactory;
    if (binary)
      pipelineFactory = createMemcachedBinaryPipelineFactory(cache, memcachedVersion, verbose, idleTime,
          allChannels);
    else
      pipelineFactory = createMemcachedPipelineFactory(cache, memcachedVersion, verbose, idleTime, frameSize,
View Full Code Here


  public NettyServer(Responder responder, InetSocketAddress addr) {
    this.responder = responder;
    channelFactory = new NioServerSocketChannelFactory(Executors
        .newCachedThreadPool(), Executors.newCachedThreadPool());
    ServerBootstrap bootstrap = new ServerBootstrap(channelFactory);
    bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
      @Override
      public ChannelPipeline getPipeline() throws Exception {
        ChannelPipeline p = Channels.pipeline();
        p.addLast("frameDecoder", new NettyFrameDecoder());
        p.addLast("frameEncoder", new NettyFrameEncoder());
View Full Code Here

    // Set up.
    this.channelFactory = channelFactory;
    ClientBootstrap bootstrap = new ClientBootstrap(channelFactory);

    // Configure the event pipeline factory.
    bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
      @Override
      public ChannelPipeline getPipeline() throws Exception {
        ChannelPipeline p = Channels.pipeline();
        p.addLast("frameDecoder", new NettyFrameDecoder());
        p.addLast("frameEncoder", new NettyFrameEncoder());
View Full Code Here

    String host = listenAddress.host;
    int port = listenAddress.port;
    bootstrap = new ServerBootstrap(new NioServerSocketChannelFactory(
            Executors.newCachedThreadPool(),
            Executors.newCachedThreadPool()));
    bootstrap.setPipelineFactory(new ChannelPipelineFactory()
    {
      @Override
      public ChannelPipeline getPipeline() throws Exception
      {
        ChannelPipeline pipeline = Channels.pipeline();
View Full Code Here

    {
      clientBootstrap = new ClientBootstrap(
              new NioClientSocketChannelFactory(
                      Executors.newCachedThreadPool(),
                      Executors.newCachedThreadPool()));
      clientBootstrap.setPipelineFactory(new ChannelPipelineFactory()
      {

        @Override
        public ChannelPipeline getPipeline() throws Exception
        {
View Full Code Here

      super(host, port, request, oneShot);
    }

    @Override
    protected ChannelPipelineFactory setPipelineFactory() {
      this.pipelineFactory = new ChannelPipelineFactory() {
        public ChannelPipeline getPipeline() {
          return Channels.pipeline(new RpcFrameDecoder(), new WriteHandler(
              request));
        }
      };
View Full Code Here

    /**
     * Pipeline setup: depends on whether configured to use authentication
     * or not.
     */
    bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
      @Override
      public ChannelPipeline getPipeline() throws Exception {
/*if_not[HADOOP_NON_SECURE]*/
        if (conf.authenticate()) {
          LOG.info("start: Will use Netty pipeline with " +
View Full Code Here

    bootstrap.setOption("keepAlive", true);
    bootstrap.setOption("sendBufferSize", sendBufferSize);
    bootstrap.setOption("receiveBufferSize", receiveBufferSize);

    // Set up the pipeline factory.
    bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
      @Override
      public ChannelPipeline getPipeline() throws Exception {
/*if_not[HADOOP_NON_SECURE]*/
        if (conf.authenticate()) {
          LOG.info("Using Netty with authentication.");
View Full Code Here

        } else {
            uuid = Long.toHexString(UUID.randomUUID().getMostSignificantBits());
        }
        clientFactory = new NioClientSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool());
        clientBootstrap = new ClientBootstrap(clientFactory);
        clientBootstrap.setPipelineFactory(new ChannelPipelineFactory() {
            public ChannelPipeline getPipeline() throws Exception {
                return Channels.pipeline(new MeshyChannelHandler());
            }
        });
        clientBootstrap.setOption("tcpNoDelay", true);
View Full Code Here

  }

  private void setupClientPipeline() {
    clientBootstrap.setOption("tcpNoDelay", true);
    clientBootstrap.setOption("keepAlive", true);
    clientBootstrap.setPipelineFactory(new ChannelPipelineFactory() {
      @Override
      public ChannelPipeline getPipeline() throws Exception {
        ChannelPipeline pipeline = Channels.pipeline();
        pipeline.addLast("passHandler", new PassHandler());
        return pipeline;
View Full Code Here

TOP

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

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.