Class Http2

  • All Implemented Interfaces:
    Variant

    public final class Http2
    extends Object
    implements Variant
    Read and write HTTP/2 frames.

    This implementation assumes we do not send an increased frame size setting to the peer. Hence, we expect all frames to have a max length of INITIAL_MAX_FRAME_SIZE.

    http://tools.ietf.org/html/draft-ietf-httpbis-http2-17

    • Constructor Detail

      • Http2

        public Http2()
    • Method Detail

      • getProtocol

        public Protocol getProtocol()
        Description copied from interface: Variant
        The protocol as selected using ALPN.
        Specified by:
        getProtocol in interface Variant
      • newReader

        public FrameReader newReader​(BufferedSource source,
                                     boolean client)
        Creates a frame reader with max header table size of 4096 and data frame compression disabled.
        Specified by:
        newReader in interface Variant
        client - true if this is the HTTP client's reader, reading frames from a server.
      • newWriter

        public FrameWriter newWriter​(BufferedSink sink,
                                     boolean client)
        Specified by:
        newWriter in interface Variant
        client - true if this is the HTTP client's writer, writing frames to a server.