java.lang.Object
io.helidon.http.http2.Http2FrameHeader
Frame header.
HTTP/2 frame header has a fixed length of 9 bytes.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Http2Flag>
Http2FrameHeadercreate
(int length, Http2FrameTypes<T> frameType, T flags, int streamIdentifier) Create a frame header from known values.static Http2FrameHeader
create
(BufferData bytes) Create a header from header bytes.int
flags()
Flags as an integer.<T extends Http2Flag>
Tflags
(Http2FrameTypes<T> types) Get typed flags of this frame header.int
length()
Length of the associated frame data.int
streamId()
Stream id this header belongs to.toString()
type()
Frame type enum.Flags typed correctly based on thetype()
.write()
Write this header as buffer data.
-
Field Details
-
LENGTH
public static final int LENGTHFrame header length in bytes.- See Also:
-
-
Method Details
-
create
Create a header from header bytes.- Parameters:
bytes
- frame header data, contains at least 9 bytes.- Returns:
- frame header parsed from the data
-
create
public static <T extends Http2Flag> Http2FrameHeader create(int length, Http2FrameTypes<T> frameType, T flags, int streamIdentifier) Create a frame header from known values.- Type Parameters:
T
- type of flags- Parameters:
length
- length of the associate frame dataframeType
- frame types of this frameflags
- flags of the framestreamIdentifier
- stream this frame belongs to- Returns:
- frame header
-
toString
-
flags
Get typed flags of this frame header.- Type Parameters:
T
- type of flags- Parameters:
types
- frame types- Returns:
- correctly typed flags
-
type
Frame type enum.- Returns:
- frame type
-
length
public int length()Length of the associated frame data.- Returns:
- frame data length
-
flags
public int flags()Flags as an integer.- Returns:
- flags
-
streamId
public int streamId()Stream id this header belongs to.- Returns:
- stream id (
0
means this is connection related, not stream related)
-
write
Write this header as buffer data.- Returns:
- buffer data of this headewr
-
typedFlags
Flags typed correctly based on thetype()
.- Returns:
- typed flags
- See Also:
-