Package io.netty.handler.codec.http2

Examples of io.netty.handler.codec.http2.DelegatingHttp2HttpConnectionHandler


            verifyNoWrite(STREAM_A);
            verifyNoWrite(STREAM_B);
            verifyNoWrite(STREAM_C);
            verifyNoWrite(STREAM_D);

            OutboundFlowState state = state(stream0);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_A, STREAM_B, STREAM_C, STREAM_D)),
                    state.priorityBytes());
            state = state(streamA);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_A, STREAM_C, STREAM_D)),
                    state.priorityBytes());
            state = state(streamB);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_B)), state.priorityBytes());
            state = state(streamC);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_C)), state.priorityBytes());
            state = state(streamD);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_D)), state.priorityBytes());
        } finally {
            manualSafeRelease(bufs);
        }
    }
View Full Code Here


            verifyNoWrite(STREAM_B);
            verifyNoWrite(STREAM_C);
            verifyNoWrite(STREAM_D);

            streamB.setPriority(STREAM_A, DEFAULT_PRIORITY_WEIGHT, true);
            OutboundFlowState state = state(stream0);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_A, STREAM_B, STREAM_C, STREAM_D)),
                    state.priorityBytes());
            state = state(streamA);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_A, STREAM_B, STREAM_C, STREAM_D)),
                    state.priorityBytes());
            state = state(streamB);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_B, STREAM_C, STREAM_D)),
                    state.priorityBytes());
            state = state(streamC);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_C)), state.priorityBytes());
            state = state(streamD);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_D)), state.priorityBytes());
        } finally {
            manualSafeRelease(bufs);
        }
    }
View Full Code Here

            verifyNoWrite(STREAM_B);
            verifyNoWrite(STREAM_C);
            verifyNoWrite(STREAM_D);
            verifyNoWrite(STREAM_E);

            OutboundFlowState state = state(stream0);
            assertEquals(
                    calculateStreamSizeSum(streamSizes,
                            Arrays.asList(STREAM_A, STREAM_B, STREAM_C, STREAM_D, STREAM_E)),
                    state.priorityBytes());
            state = state(streamA);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_A, STREAM_E, STREAM_C, STREAM_D)),
                    state.priorityBytes());
            state = state(streamB);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_B)), state.priorityBytes());
            state = state(streamC);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_C)), state.priorityBytes());
            state = state(streamD);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_D)), state.priorityBytes());
            state = state(streamE);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_E, STREAM_C, STREAM_D)),
                    state.priorityBytes());
        } finally {
            manualSafeRelease(bufs);
        }
    }
View Full Code Here

            verifyNoWrite(STREAM_C);
            verifyNoWrite(STREAM_D);

            streamA.close();

            OutboundFlowState state = state(stream0);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_B, STREAM_C, STREAM_D)),
                    state.priorityBytes());
            state = state(streamA);
            assertEquals(0, state.priorityBytes());
            state = state(streamB);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_B)), state.priorityBytes());
            state = state(streamC);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_C)), state.priorityBytes());
            state = state(streamD);
            assertEquals(calculateStreamSizeSum(streamSizes, Arrays.asList(STREAM_D)), state.priorityBytes());
        } finally {
            manualSafeRelease(bufs);
        }
    }
View Full Code Here

        connectionHandler = new Http2ToHttpConnectionHandler(connection,
                frameReader(),
                frameWriter,
                new DefaultHttp2InboundFlowController(connection, frameWriter),
                new DefaultHttp2OutboundFlowController(connection, frameWriter),
                new DelegatingDecompressorFrameListener(connection,
                        InboundHttp2ToHttpAdapter.newInstance(connection, maxContentLength)));
        responseHandler = new HttpResponseHandler();
        settingsHandler = new Http2SettingsHandler(ch.newPromise());
        if (sslCtx != null) {
            configureSsl(ch);
View Full Code Here

    @Override
    public void initChannel(SocketChannel ch) throws Exception {
        Http2Connection connection = new DefaultHttp2Connection(false);
        Http2FrameWriter frameWriter = frameWriter();
        connectionHandler = new DelegatingHttp2HttpConnectionHandler(connection,
                        frameReader(), frameWriter, new DefaultHttp2InboundFlowController(connection, frameWriter),
                        new DefaultHttp2OutboundFlowController(connection, frameWriter),
                        InboundHttp2ToHttpAdapter.newInstance(connection, maxContentLength));
        responseHandler = new HttpResponseHandler();
        settingsHandler = new Http2SettingsHandler(ch.newPromise());
View Full Code Here

    /**
     * Configure the pipeline for a cleartext upgrade from HTTP to HTTP/2.
     */
    private void configureClearText(SocketChannel ch) {
        HttpClientCodec sourceCodec = new HttpClientCodec();
        Http2ClientUpgradeCodec upgradeCodec = new Http2ClientUpgradeCodec(connectionHandler);
        HttpClientUpgradeHandler upgradeHandler = new HttpClientUpgradeHandler(sourceCodec, upgradeCodec, 65536);

        ch.pipeline().addLast("Http2SourceCodec", sourceCodec);
        ch.pipeline().addLast("Http2UpgradeHandler", upgradeHandler);
        ch.pipeline().addLast("Http2UpgradeRequestHandler", new UpgradeRequestHandler());
View Full Code Here

    /**
     * Configure the pipeline for a cleartext upgrade from HTTP to HTTP/2.
     */
    private void configureClearText(SocketChannel ch) {
        HttpClientCodec sourceCodec = new HttpClientCodec();
        Http2ClientUpgradeCodec upgradeCodec = new Http2ClientUpgradeCodec(connectionHandler);
        HttpClientUpgradeHandler upgradeHandler = new HttpClientUpgradeHandler(sourceCodec, upgradeCodec, 65536);

        ch.pipeline().addLast("Http2SourceCodec", sourceCodec);
        ch.pipeline().addLast("Http2UpgradeHandler", upgradeHandler);
        ch.pipeline().addLast("Http2UpgradeRequestHandler", new UpgradeRequestHandler());
View Full Code Here

        this.maxContentLength = maxContentLength;
    }

    @Override
    public void initChannel(SocketChannel ch) throws Exception {
        Http2Connection connection = new DefaultHttp2Connection(false);
        Http2FrameWriter frameWriter = frameWriter();
        connectionHandler = new DelegatingHttp2HttpConnectionHandler(connection,
                        frameReader(), frameWriter, new DefaultHttp2InboundFlowController(connection, frameWriter),
                        new DefaultHttp2OutboundFlowController(connection, frameWriter),
                        InboundHttp2ToHttpAdapter.newInstance(connection, maxContentLength));
View Full Code Here

        this.maxContentLength = maxContentLength;
    }

    @Override
    public void initChannel(SocketChannel ch) throws Exception {
        final Http2Connection connection = new DefaultHttp2Connection(false);
        final Http2FrameWriter frameWriter = frameWriter();
        connectionHandler = new Http2ToHttpConnectionHandler(connection,
                frameReader(),
                frameWriter,
                new DefaultHttp2InboundFlowController(connection, frameWriter),
View Full Code Here

TOP

Related Classes of io.netty.handler.codec.http2.DelegatingHttp2HttpConnectionHandler

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.