Class Http2Protocol
- java.lang.Object
-
- akka.http.impl.engine.http2.Http2Protocol
-
public class Http2Protocol extends java.lang.Object
INTERNAL APIDefines constants as defined in the HTTP/2 specification.
https://tools.ietf.org/html/rfc7540
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Http2Protocol.ErrorCode
static class
Http2Protocol.ErrorCode$
static class
Http2Protocol.Flags$
static class
Http2Protocol.FrameType
static class
Http2Protocol.FrameType$
static class
Http2Protocol.SettingIdentifier
static class
Http2Protocol.SettingIdentifier$
-
Constructor Summary
Constructors Constructor Description Http2Protocol()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static akka.util.ByteString
ClientConnectionPreface()
The client connection preface starts with a sequence of 24 octets, which in hex notation is:static int
InitialMaxConcurrentStreams()
Indicates the maximum number of concurrent streams that the sender will allow.static int
InitialMaxFrameSize()
The initial frame size for both incoming and outgoing frames as defined by the specification.static int
InitialMaxHeaderListSize()
This advisory setting informs a peer of the maximum size of header list that the sender is prepared to accept, in octets.static int
InitialMaxHeaderTableSize()
Initial maximum size of the header compression table used to decode header blocks, in octets.static int
InitialWindowSize()
The initial window size for both new streams and the overall connection as defined by the specification.static int
MaxFrameSize()
Maximum frame size that can be written.static int
MinFrameSize()
Minimum frame size that can be written.static int
NoStreamId()
The stream id to be used for frames not associated with any individual stream as defined by the specification.static boolean
PushPromiseEnabledDefault()
-
-
-
Method Detail
-
InitialMaxConcurrentStreams
public static final int InitialMaxConcurrentStreams()
Indicates the maximum number of concurrent streams that the sender will allow. This limit is directional: it applies to the number of streams that the sender permits the receiver to create. Initially, there is no limit to this value. It is recommended that this value be no smaller than 100, so as to not unnecessarily limit parallelism.A value of 0 for SETTINGS_MAX_CONCURRENT_STREAMS SHOULD NOT be treated as special by endpoints. A zero value does prevent the creation of new streams; however, this can also happen for any limit that is exhausted with active streams. Servers SHOULD only set a zero value for short durations; if a server does not wish to accept requests, closing the connection is more appropriate.
- Returns:
- (undocumented)
-
InitialWindowSize
public static final int InitialWindowSize()
The initial window size for both new streams and the overall connection as defined by the specification.See https://tools.ietf.org/html/rfc7540#section-5.2.1: 4. The initial value for the flow-control window is 65,535 octets for both new streams and the overall connection.
- Returns:
- (undocumented)
-
InitialMaxFrameSize
public static final int InitialMaxFrameSize()
The initial frame size for both incoming and outgoing frames as defined by the specification.The frame size can be changed by changing SETTINGS_MAX_FRAME_SIZE.
See https://tools.ietf.org/html/rfc7540#section-6.5.2:
SETTINGS_MAX_FRAME_SIZE (0x5): Indicates the size of the largest frame payload that the sender is willing to receive, in octets.
The initial value is 2^14 (16,384) octets. The value advertised by an endpoint MUST be between this initial value and the maximum allowed frame size (2^24-1 or 16,777,215 octets), inclusive. Values outside this range MUST be treated as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
- Returns:
- (undocumented)
-
MinFrameSize
public static final int MinFrameSize()
Minimum frame size that can be written.See http://httpwg.org/specs/rfc7540.html#rfc.section.4.2
The size of a frame payload is limited by the maximum size that a receiver advertises in the SETTINGS_MAX_FRAME_SIZE setting. This setting can have any value between 2^14^ (16,384) and 2^24^-1 (16,777,215) octets, inclusive.
- Returns:
- (undocumented)
-
MaxFrameSize
public static final int MaxFrameSize()
Maximum frame size that can be written.See http://httpwg.org/specs/rfc7540.html#rfc.section.4.2
The size of a frame payload is limited by the maximum size that a receiver advertises in the SETTINGS_MAX_FRAME_SIZE setting. This setting can have any value between 2^14^ (16,384) and 2^24^-1 (16,777,215) octets, inclusive.
- Returns:
- (undocumented)
-
InitialMaxHeaderTableSize
public static final int InitialMaxHeaderTableSize()
Initial maximum size of the header compression table used to decode header blocks, in octets.See http://httpwg.org/specs/rfc7540.html#SettingValues
- Returns:
- (undocumented)
-
InitialMaxHeaderListSize
public static final int InitialMaxHeaderListSize()
This advisory setting informs a peer of the maximum size of header list that the sender is prepared to accept, in octets.The value is based on the uncompressed size of header fields, including the length of the name and value in octets plus an overhead of 32 octets for each header field. For any given request, a lower limit than what is advertised MAY be enforced.
See http://httpwg.org/specs/rfc7540.html#SettingValues
- Returns:
- (undocumented)
-
NoStreamId
public static final int NoStreamId()
The stream id to be used for frames not associated with any individual stream as defined by the specification.See https://tools.ietf.org/html/rfc7540#section-4.1:
Stream Identifier: A stream identifier (see Section 5.1.1) expressed as an unsigned 31-bit integer. The value 0x0 is reserved for frames that are associated with the connection as a whole as opposed to an individual stream.
- Returns:
- (undocumented)
-
PushPromiseEnabledDefault
public static final boolean PushPromiseEnabledDefault()
-
ClientConnectionPreface
public static akka.util.ByteString ClientConnectionPreface()
The client connection preface starts with a sequence of 24 octets, which in hex notation is:0x505249202a20485454502f322e300d0a0d0a534d0d0a0d0a
That is, the connection preface starts with the string "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n".
- Returns:
- (undocumented)
-
-