Package org.mockserver.model
Enum Class HttpError.StreamErrorCode
- All Implemented Interfaces:
Serializable,Comparable<HttpError.StreamErrorCode>,Constable
- Enclosing class:
- HttpError
Well-known stream-level error codes for HTTP/2 (RFC 7540 section 7) and HTTP/3
(RFC 9114 section 8.1). The numeric
code() is the value written on the wire as the
RST_STREAM (HTTP/2) or RESET_STREAM (HTTP/3) error code. The HTTP/2 and HTTP/3 code spaces are
distinct; this enum exposes both families so an expectation can name a code by mnemonic. When a
code is supplied via HttpError.withStreamError(long) the raw numeric value is used
verbatim, so any future or vendor-specific code can still be injected.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpError.StreamErrorCodeResolve a well-known code by mnemonic name (case-insensitive), returning null when the name is not recognised so the caller can decide how to handle an unknown name.longcode()static HttpError.StreamErrorCodeReturns the enum constant of this class with the specified name.static HttpError.StreamErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_ERROR
-
PROTOCOL_ERROR
-
INTERNAL_ERROR
-
FLOW_CONTROL_ERROR
-
SETTINGS_TIMEOUT
-
STREAM_CLOSED
-
FRAME_SIZE_ERROR
-
REFUSED_STREAM
-
CANCEL
-
COMPRESSION_ERROR
-
CONNECT_ERROR
-
ENHANCE_YOUR_CALM
-
INADEQUATE_SECURITY
-
HTTP_1_1_REQUIRED
-
H3_NO_ERROR
-
H3_GENERAL_PROTOCOL_ERROR
-
H3_INTERNAL_ERROR
-
H3_STREAM_CREATION_ERROR
-
H3_CLOSED_CRITICAL_STREAM
-
H3_FRAME_UNEXPECTED
-
H3_FRAME_ERROR
-
H3_EXCESSIVE_LOAD
-
H3_ID_ERROR
-
H3_SETTINGS_ERROR
-
H3_MISSING_SETTINGS
-
H3_REQUEST_REJECTED
-
H3_REQUEST_CANCELLED
-
H3_REQUEST_INCOMPLETE
-
H3_MESSAGE_ERROR
-
H3_CONNECT_ERROR
-
H3_VERSION_FALLBACK
-
-
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() -
byName
Resolve a well-known code by mnemonic name (case-insensitive), returning null when the name is not recognised so the caller can decide how to handle an unknown name.
-