- All Implemented Interfaces:
Serializable
,Comparable<Http2ErrorCode>
,Constable
HTTP/2 error codes.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionUsed by the endpoint to indicate that the stream is no longer needed.The endpoint is unable to maintain the header compression context for the connection.The connection established in response to a CONNECT request (Section 8.3) was reset or abnormally closed.The endpoint detected that its peer is exhibiting a behavior that might be generating excessive load.The endpoint detected that its peer violated the flow-control protocol.The endpoint received a frame with an invalid size.The endpoint requires that HTTP/1.1 be used instead of HTTP/2.The underlying transport has properties that do not meet minimum security requirements (see Section 9.2).The endpoint encountered an unexpected internal error.The associated condition is not a result of an error.The endpoint detected an unspecific protocol error.The endpoint refused the stream prior to performing any application processing (see Section 8.1.4 for details).Request header fields are too large.The endpoint sent a SETTINGS frame but did not receive a response in a timely manner.The endpoint received a frame after a stream was half-closed. -
Method Summary
Modifier and TypeMethodDescriptionint
code()
Numeric code of this error.static Http2ErrorCode
get
(int errorCode) Get error code enum based on error code number.static Http2ErrorCode
Returns the enum constant of this class with the specified name.static Http2ErrorCode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_ERROR
The associated condition is not a result of an error. For example, a GOAWAY might include this code to indicate graceful shutdown of a connection. -
PROTOCOL
The endpoint detected an unspecific protocol error. This error is for use when a more specific error code is not available. -
INTERNAL
The endpoint encountered an unexpected internal error. -
FLOW_CONTROL
The endpoint detected that its peer violated the flow-control protocol. -
SETTINGS_TIMEOUT
The endpoint sent a SETTINGS frame but did not receive a response in a timely manner. See Section 6.5.3 ("Settings Synchronization"). -
STREAM_CLOSED
The endpoint received a frame after a stream was half-closed. -
FRAME_SIZE
The endpoint received a frame with an invalid size. -
REFUSED_STREAM
The endpoint refused the stream prior to performing any application processing (see Section 8.1.4 for details). -
CANCEL
Used by the endpoint to indicate that the stream is no longer needed. -
COMPRESSION
The endpoint is unable to maintain the header compression context for the connection. -
CONNECT
The connection established in response to a CONNECT request (Section 8.3) was reset or abnormally closed. -
ENHANCE_YOUR_CALM
The endpoint detected that its peer is exhibiting a behavior that might be generating excessive load. -
INADEQUATE_SECURITY
The underlying transport has properties that do not meet minimum security requirements (see Section 9.2). -
HTTP_1_1_REQUIRED
The endpoint requires that HTTP/1.1 be used instead of HTTP/2. -
REQUEST_HEADER_FIELDS_TOO_LARGE
Request header fields are too large. RFC6585
-
-
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
-
get
Get error code enum based on error code number.- Parameters:
errorCode
- error code- Returns:
- enum for the error code, returns
INTERNAL
when not found
-
code
public int code()Numeric code of this error.- Returns:
- error code
-