public static enum HttpUtil.Http2Error extends Enum<HttpUtil.Http2Error>
Enum Constant and Description |
---|
CANCEL |
COMPRESSION_ERROR |
CONNECT_ERROR |
ENHANCE_YOUR_CALM |
FLOW_CONTROL_ERROR |
FRAME_SIZE_ERROR |
HTTP_1_1_REQUIRED |
INADEQUATE_SECURITY |
INTERNAL_ERROR |
NO_ERROR |
PROTOCOL_ERROR |
REFUSED_STREAM |
SETTINGS_TIMEOUT |
STREAM_CLOSED |
Modifier and Type | Method and Description |
---|---|
long |
code()
Gets the code for this error used on the wire.
|
static HttpUtil.Http2Error |
forCode(long code)
Looks up the HTTP/2 error code enum value for the specified code.
|
Status |
status()
Gets the
Status associated with this HTTP/2 code. |
static Status |
statusForCode(long code)
Looks up the
Status from the given HTTP/2 error code. |
static HttpUtil.Http2Error |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HttpUtil.Http2Error[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpUtil.Http2Error NO_ERROR
public static final HttpUtil.Http2Error PROTOCOL_ERROR
public static final HttpUtil.Http2Error INTERNAL_ERROR
public static final HttpUtil.Http2Error FLOW_CONTROL_ERROR
public static final HttpUtil.Http2Error SETTINGS_TIMEOUT
public static final HttpUtil.Http2Error STREAM_CLOSED
public static final HttpUtil.Http2Error FRAME_SIZE_ERROR
public static final HttpUtil.Http2Error REFUSED_STREAM
public static final HttpUtil.Http2Error CANCEL
public static final HttpUtil.Http2Error COMPRESSION_ERROR
public static final HttpUtil.Http2Error CONNECT_ERROR
public static final HttpUtil.Http2Error ENHANCE_YOUR_CALM
public static final HttpUtil.Http2Error INADEQUATE_SECURITY
public static final HttpUtil.Http2Error HTTP_1_1_REQUIRED
public static HttpUtil.Http2Error[] values()
for (HttpUtil.Http2Error c : HttpUtil.Http2Error.values()) System.out.println(c);
public static HttpUtil.Http2Error valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic long code()
public static HttpUtil.Http2Error forCode(long code)
code
- an HTTP/2 error code value.null
if not found.public static Status statusForCode(long code)
Status
from the given HTTP/2 error code. This is preferred over forCode(code).status()
, to more easily conform to HTTP/2:
Unknown or unsupported error codes MUST NOT trigger any special behavior. These MAY be treated by an implementation as being equivalent to INTERNAL_ERROR.
code
- the HTTP/2 error code.Status
representing the given error.