Search in sources :

Example 11 with HTTP2Connection

use of org.eclipse.jetty.http2.HTTP2Connection in project grpc-java by grpc.

the class NettyClientHandlerTest method newHandler.

@Override
protected NettyClientHandler newHandler() throws Http2Exception {
    Http2Connection connection = new DefaultHttp2Connection(false);
    // Create and close a stream previous to the nextStreamId.
    Http2Stream stream = connection.local().createStream(streamId - 2, true);
    stream.close();
    Ticker ticker = new Ticker() {

        @Override
        public long read() {
            return nanoTime;
        }
    };
    return NettyClientHandler.newHandler(connection, frameReader(), frameWriter(), lifecycleManager, mockKeepAliveManager, flowControlWindow, maxHeaderListSize, ticker);
}
Also used : DefaultHttp2Connection(io.netty.handler.codec.http2.DefaultHttp2Connection) DefaultHttp2Connection(io.netty.handler.codec.http2.DefaultHttp2Connection) Http2Connection(io.netty.handler.codec.http2.Http2Connection) Ticker(com.google.common.base.Ticker) Http2Stream(io.netty.handler.codec.http2.Http2Stream)

Aggregations

Http2Connection (io.netty.handler.codec.http2.Http2Connection)10 DefaultHttp2Connection (io.netty.handler.codec.http2.DefaultHttp2Connection)8 Http2ConnectionDecoder (io.netty.handler.codec.http2.Http2ConnectionDecoder)4 Http2ConnectionEncoder (io.netty.handler.codec.http2.Http2ConnectionEncoder)4 DefaultHttp2ConnectionEncoder (io.netty.handler.codec.http2.DefaultHttp2ConnectionEncoder)3 DefaultHttp2FrameReader (io.netty.handler.codec.http2.DefaultHttp2FrameReader)3 DefaultHttp2FrameWriter (io.netty.handler.codec.http2.DefaultHttp2FrameWriter)3 Http2ConnectionHandler (io.netty.handler.codec.http2.Http2ConnectionHandler)3 Http2FrameAdapter (io.netty.handler.codec.http2.Http2FrameAdapter)3 Http2Stream (io.netty.handler.codec.http2.Http2Stream)3 Bootstrap (io.netty.bootstrap.Bootstrap)2 Channel (io.netty.channel.Channel)2 ChannelPipeline (io.netty.channel.ChannelPipeline)2 EventLoopGroup (io.netty.channel.EventLoopGroup)2 NioEventLoopGroup (io.netty.channel.nio.NioEventLoopGroup)2 NioSocketChannel (io.netty.channel.socket.nio.NioSocketChannel)2 DefaultHttp2ConnectionDecoder (io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder)2 Http2ConnectionHandlerBuilder (io.netty.handler.codec.http2.Http2ConnectionHandlerBuilder)2 Http2Settings (io.netty.handler.codec.http2.Http2Settings)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1