Package io.github.mahmoudimus.http3
Enum Class Http3ErrorCode
- All Implemented Interfaces:
Serializable,Comparable<Http3ErrorCode>,Constable
The HTTP/3 error codes (RFC 9114 §8.1), the QPACK error codes (RFC 9204 §6) and
H3_DATAGRAM_ERROR (RFC 9297 §5.2). QUIC carries them: CONNECTION_CLOSE for a connection error,
RESET_STREAM and STOP_SENDING for a stream error.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA stream the connection needs was closed or reset.The connection of a CONNECT request was reset or closed abnormally.An HTTP Datagram or the Capsule Protocol was misused (RFC 9297 §5.2).The peer is generating excessive load.A frame that fails its layout requirements, or of the wrong size.A frame not permitted in the current state or on the current stream.A protocol violation no more specific code covers.A stream or push identifier was used incorrectly.An internal error in the HTTP stack.A malformed HTTP message.No SETTINGS frame at the start of the control stream.No error: the connection or stream is closing without one.The request or its response is cancelled.The client's stream ended without a complete request.The server rejected a request without processing any of it.An error in the payload of a SETTINGS frame.The peer created a stream that will not be accepted.The request should be retried over HTTP/1.1.An instruction on the decoder stream could not be processed.A field section could not be decoded (RFC 9204 §6).An instruction on the encoder stream could not be processed. -
Method Summary
Modifier and TypeMethodDescriptionlongcode()The value sent on the wire, a variable-length integer.static Http3ErrorCodeforCode(long code) The error code for a wire value.static booleanisReserved(long code) Whethercodeis a reserved (greasing) error code, 0x1f * N + 0x21 (RFC 9114 §8.1).static Http3ErrorCodeReturns the enum constant of this class with the specified name.static Http3ErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
H3_DATAGRAM_ERROR
An HTTP Datagram or the Capsule Protocol was misused (RFC 9297 §5.2). -
H3_NO_ERROR
No error: the connection or stream is closing without one. -
H3_GENERAL_PROTOCOL_ERROR
A protocol violation no more specific code covers. -
H3_INTERNAL_ERROR
An internal error in the HTTP stack. -
H3_STREAM_CREATION_ERROR
The peer created a stream that will not be accepted. -
H3_CLOSED_CRITICAL_STREAM
A stream the connection needs was closed or reset. -
H3_FRAME_UNEXPECTED
A frame not permitted in the current state or on the current stream. -
H3_FRAME_ERROR
A frame that fails its layout requirements, or of the wrong size. -
H3_EXCESSIVE_LOAD
The peer is generating excessive load. -
H3_ID_ERROR
A stream or push identifier was used incorrectly. -
H3_SETTINGS_ERROR
An error in the payload of a SETTINGS frame. -
H3_MISSING_SETTINGS
No SETTINGS frame at the start of the control stream. -
H3_REQUEST_REJECTED
The server rejected a request without processing any of it. -
H3_REQUEST_CANCELLED
The request or its response is cancelled. -
H3_REQUEST_INCOMPLETE
The client's stream ended without a complete request. -
H3_MESSAGE_ERROR
A malformed HTTP message. -
H3_CONNECT_ERROR
The connection of a CONNECT request was reset or closed abnormally. -
H3_VERSION_FALLBACK
The request should be retried over HTTP/1.1. -
QPACK_DECOMPRESSION_FAILED
A field section could not be decoded (RFC 9204 §6). -
QPACK_ENCODER_STREAM_ERROR
An instruction on the encoder stream could not be processed. -
QPACK_DECODER_STREAM_ERROR
An instruction on the decoder stream could not be processed.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
code
public long code()The value sent on the wire, a variable-length integer.- Returns:
- the wire value
-
forCode
The error code for a wire value. Unknown codes, including the reserved ones, must be treated asH3_NO_ERROR(RFC 9114 §9).- Parameters:
code- the wire value- Returns:
- its error code, or
H3_NO_ERRORfor an unknown one
-
isReserved
public static boolean isReserved(long code) Whethercodeis a reserved (greasing) error code, 0x1f * N + 0x21 (RFC 9114 §8.1).- Parameters:
code- the wire value- Returns:
- whether it is reserved
-