Package io.github.mahmoudimus.http3
Interface Http3Frame
- All Known Implementing Classes:
Http3Frame.CancelPush,Http3Frame.Data,Http3Frame.GoAway,Http3Frame.Headers,Http3Frame.MaxPushId,Http3Frame.PushPromise,Http3Frame.Settings,Http3Frame.Unknown
public sealed interface Http3Frame
permits Http3Frame.Data, Http3Frame.Headers, Http3Frame.CancelPush, Http3Frame.Settings, Http3Frame.PushPromise, Http3Frame.GoAway, Http3Frame.MaxPushId, Http3Frame.Unknown
One HTTP/3 frame (RFC 9114 §7.2). Instances are immutable apart from their byte arrays, which are
not copied: whoever creates a frame hands its arrays over.
Unlike HTTP/2 frames, HTTP/3 frames carry no stream identifier and no flags: the QUIC stream they arrive on gives the stream, and the end of a message is the end of that stream.
The constructors check only what any frame of the type must satisfy (value ranges),
throwing IllegalArgumentException; rules about what the peer is allowed to send are
checked by Http3FrameReader and Http3StreamValidator and raised as
Http3Exception.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordCANCEL_PUSH (§7.2.3), on the control stream.static final recordDATA (§7.2.1): part of a message's content.static final recordGOAWAY (§7.2.6), on the control stream.static final recordHEADERS (§7.2.2): a QPACK-encoded field section, decoded withQpackDecoder.static final recordMAX_PUSH_ID (§7.2.7), sent by a client on the control stream.static final recordPUSH_PROMISE (§7.2.5): a promised request's QPACK-encoded field section, on a request stream.static final recordSETTINGS (§7.2.4), the first frame on each control stream and sent once.static final recordA frame of any other type: an extension, or a reserved type (0x1f * N + 0x21) used for greasing. -
Method Summary
Modifier and TypeMethodDescriptionlongtype()The frame type code: one of theHttp3FrameTypeconstants, or any other forHttp3Frame.Unknown.
-
Method Details
-
type
long type()The frame type code: one of theHttp3FrameTypeconstants, or any other forHttp3Frame.Unknown.- Returns:
- the type code
-