Package org.jboss.netty.handler.codec.frame

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


        if (sslFactory != null) {
            pipeline.addLast("ssl", new SslHandler(sslFactory.getEngine()));
        }
        pipeline.addLast("lengthbaseddecoder",
                         new LengthFieldBasedFrameDecoder(maxMessageSize, 0, 4, 0, 4));
        pipeline.addLast("lengthprepender", new LengthFieldPrepender(4));

        pipeline.addLast("protobufdecoder", new ProtobufDecoder(PubSubProtocol.PubSubRequest.getDefaultInstance()));
        pipeline.addLast("protobufencoder", new ProtobufEncoder());

        // pipeline.addLast("executor", new ExecutionHandler(
View Full Code Here


    @Override
    public ChannelPipeline getPipeline() throws Exception {
        ChannelPipeline pipeline = Channels.pipeline();
        pipeline.addLast("lengthbaseddecoder",
                         new LengthFieldBasedFrameDecoder(1024 * 1024, 0, 4, 0, 4));
        pipeline.addLast("lengthprepender", new LengthFieldPrepender(4));
        pipeline.addLast("main", this);
        return pipeline;
    }
View Full Code Here

        if (channelManager.getSslFactory() != null) {
            pipeline.addLast("ssl", new SslHandler(channelManager.getSslFactory().getEngine()));
        }
        pipeline.addLast("lengthbaseddecoder", new LengthFieldBasedFrameDecoder(
                         cfg.getMaximumMessageSize(), 0, 4, 0, 4));
        pipeline.addLast("lengthprepender", new LengthFieldPrepender(4));

        pipeline.addLast("protobufdecoder", new ProtobufDecoder(PubSubProtocol.PubSubResponse.getDefaultInstance()));
        pipeline.addLast("protobufencoder", new ProtobufEncoder());

        pipeline.addLast("responsehandler", createHChannelHandler());
View Full Code Here

        bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
            @Override
            public ChannelPipeline getPipeline() {
                ChannelPipeline p = Channels.pipeline();
                p.addLast("1", new LengthFieldPrepender(4));
                p.addLast("2", new TestHandler());
                return p;
            }
        });
View Full Code Here

    @Override
    public ChannelPipeline getPipeline()
            throws Exception
    {
        ChannelPipeline cp = Channels.pipeline();
        cp.addLast("frameEncoder", new LengthFieldPrepender(4));
        cp.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(maxFrameSize, 0, 4, 0, 4));
        return cp;
    }
View Full Code Here

        return new ChannelPipelineFactory() {
            @Override
            public ChannelPipeline getPipeline()
                    throws Exception {
                ChannelPipeline cp = Channels.pipeline();
                cp.addLast("frameEncoder", new LengthFieldPrepender(LENGTH_FIELD_LENGTH));
                cp.addLast(
                        "frameDecoder",
                        new LengthFieldBasedFrameDecoder(
                                maxFrameSize,
                                LENGTH_FIELD_OFFSET,
View Full Code Here

    @Override
    public ChannelPipeline getPipeline() throws Exception {
        final ChannelPipeline pipeline = Channels.pipeline();
        pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder((int) ((1L << (lengthFieldSize * 8)) - 1) & (-1 >>> 1), 0, lengthFieldSize, 0, lengthFieldSize));
        pipeline.addLast("frameEncoder", new LengthFieldPrepender(lengthFieldSize, false));
        if (executor != null)
            pipeline.addLast("executor", new ExecutionHandler(executor));
        pipeline.addLast("logging", new LoggingHandler(logger));
        // a node resolver must be added before the mesage codec
        pipeline.addLast("messageCodec", new MessageCodec());
View Full Code Here

    @Override
    public ChannelPipeline getPipeline() throws Exception {
        final ChannelPipeline pipeline = Channels.pipeline();
        pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder((int) ((1L << (lengthFieldSize * 8)) - 1) & (-1 >>> 1), 0, lengthFieldSize, 0, lengthFieldSize));
        pipeline.addLast("frameEncoder", new LengthFieldPrepender(lengthFieldSize, false));
        if (executor != null)
            pipeline.addLast("executor", new ExecutionHandler(executor));
        pipeline.addLast("logging", new LoggingHandler(logger));
        // a node resolver must be added before the mesage codec
        pipeline.addLast("messageCodec", new MessageCodec());
View Full Code Here

        p.addLast(MetricRecordingHandler.NAME, new MetricRecordingHandler());

        p.addLast("frameDecoder", new ProtobufVarint32FrameDecoder());
        p.addLast("protobufDecoder", new ProtobufDecoder(NetData.NetMessage.getDefaultInstance()));

        p.addLast("frameLengthEncoder", new LengthFieldPrepender(3));
        p.addLast("deflateEncoder", new ZlibEncoder());
        p.addLast("frameEncoder", new ProtobufVarint32LengthFieldPrepender());
        p.addLast("protobufEncoder", new ProtobufEncoder());

        p.addLast("authenticationHandler", new ServerHandshakeHandler());
View Full Code Here

        return new ChannelPipelineFactory() {
            @Override
            public ChannelPipeline getPipeline()
                    throws Exception {
                ChannelPipeline cp = Channels.pipeline();
                cp.addLast("frameEncoder", new LengthFieldPrepender(LENGTH_FIELD_LENGTH));
                cp.addLast(
                        "frameDecoder",
                        new LengthFieldBasedFrameDecoder(
                                maxFrameSize,
                                LENGTH_FIELD_OFFSET,
View Full Code Here

TOP

Related Classes of org.jboss.netty.handler.codec.frame.LengthFieldPrepender

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.