Examples of FixedLengthFrameDecoder


Examples of com.facebook.presto.jdbc.internal.netty.handler.codec.frame.FixedLengthFrameDecoder

            @Override
            public ChannelPipeline getPipeline()
                    throws Exception
            {
                final ChannelPipeline cp = Channels.pipeline();
                cp.addLast(FRAME_DECODER, new FixedLengthFrameDecoder(8));
                cp.addLast(HANDSHAKE, new Socks4HandshakeHandler(Socks4ClientBootstrap.super.getPipelineFactory()));
                return cp;
            }
        };
    }
View Full Code Here

Examples of io.netty.handler.codec.FixedLengthFrameDecoder

                    conf.getNettyCompressionEncoder(),
                    handlerToUseExecutionGroup, executionGroup, ch);
              }
              PipelineUtils.addLastWithExecutorCheck(
                  "fixed-length-frame-decoder",
                  new FixedLengthFrameDecoder(
                      RequestServerHandler.RESPONSE_BYTES),
                 handlerToUseExecutionGroup, executionGroup, ch);
              PipelineUtils.addLastWithExecutorCheck("request-encoder",
                    new RequestEncoder(conf), handlerToUseExecutionGroup,
                  executionGroup, ch);
View Full Code Here

Examples of io.netty.handler.codec.FixedLengthFrameDecoder

      // Remove SaslClientHandler and replace LengthFieldBasedFrameDecoder
      // from client pipeline.
      ctx.pipeline().remove(this);
      ctx.pipeline().replace("length-field-based-frame-decoder",
          "fixed-length-frame-decoder",
          new FixedLengthFrameDecoder(RequestServerHandler.RESPONSE_BYTES));
      return;
    }
    SaslTokenMessageRequest serverToken =
      (SaslTokenMessageRequest) decodedMessage;
    if (LOG.isDebugEnabled()) {
View Full Code Here

Examples of io.netty.handler.codec.FixedLengthFrameDecoder

        final EchoHandler ch = new EchoHandler(autoRead);

        sb.childHandler(new ChannelInitializer<SocketChannel>() {
            @Override
            public void initChannel(SocketChannel sch) throws Exception {
                sch.pipeline().addLast("decoder", new FixedLengthFrameDecoder(1024));
                sch.pipeline().addAfter("decoder", "handler", sh);
            }
        });

        cb.handler(new ChannelInitializer<SocketChannel>() {
            @Override
            public void initChannel(SocketChannel sch) throws Exception {
                sch.pipeline().addLast("decoder", new FixedLengthFrameDecoder(1024));
                sch.pipeline().addAfter("decoder", "handler", ch);
            }
        });

        Channel sc = sb.bind().sync().channel();
View Full Code Here

Examples of org.jboss.netty.handler.codec.frame.FixedLengthFrameDecoder

      // Remove SaslClientHandler and replace LengthFieldBasedFrameDecoder
      // from client pipeline.
      ctx.getPipeline().remove(this);
      ctx.getPipeline().replace("length-field-based-frame-decoder",
          "fixed-length-frame-decoder",
          new FixedLengthFrameDecoder(RequestServerHandler.RESPONSE_BYTES));
      return;
    }
    SaslTokenMessageRequest serverToken =
      (SaslTokenMessageRequest) decodedMessage;
    if (LOG.isDebugEnabled()) {
View Full Code Here

Examples of org.jboss.netty.handler.codec.frame.FixedLengthFrameDecoder

          LOG.info("Using Netty without authentication.");
/*end[HADOOP_NON_SECURE]*/
          ChannelPipeline pipeline = pipeline();
          pipeline.addLast("clientByteCounter", byteCounter);
          pipeline.addLast("responseFrameDecoder",
              new FixedLengthFrameDecoder(RequestServerHandler.RESPONSE_BYTES));
          pipeline.addLast("requestEncoder", new RequestEncoder(conf));
          pipeline.addLast("responseClientHandler",
              new ResponseClientHandler(clientRequestIdRequestInfoMap, conf));
          if (executionHandler != null) {
            pipeline.addAfter(handlerBeforeExecutionHandler,
View Full Code Here

Examples of org.jboss.netty.handler.codec.frame.FixedLengthFrameDecoder

            @Override
            public ChannelPipeline getPipeline()
                    throws Exception
            {
                final ChannelPipeline cp = Channels.pipeline();
                cp.addLast(FRAME_DECODER, new FixedLengthFrameDecoder(8));
                cp.addLast(HANDSHAKE, new Socks4HandshakeHandler(Socks4ClientBootstrap.super.getPipelineFactory()));
                return cp;
            }
        };
    }
View Full Code Here

Examples of org.jboss.netty.handler.codec.frame.FixedLengthFrameDecoder

            @Override
            public ChannelPipeline getPipeline()
                    throws Exception
            {
                final ChannelPipeline cp = Channels.pipeline();
                cp.addLast(FRAME_DECODER, new FixedLengthFrameDecoder(8));
                cp.addLast(HANDSHAKE, new Socks4HandshakeHandler(Socks4ClientBootstrap.super.getPipelineFactory()));
                return cp;
            }
        };
    }
View Full Code Here

Examples of org.jboss.netty.handler.codec.frame.FixedLengthFrameDecoder

    private void initM2mServer(final String protocol) throws SQLException {
        if (isProtocolEnabled(properties, protocol)) {
            serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
                @Override
                protected void addSpecificHandlers(ChannelPipeline pipeline) {
                    pipeline.addLast("frameDecoder", new FixedLengthFrameDecoder(23));
                    pipeline.addLast("objectDecoder", new M2mProtocolDecoder(dataManager, protocol, properties));
                }
            });
        }
    }
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.