Enum ErrorCode
- java.lang.Object
-
- java.lang.Enum<ErrorCode>
-
- com.squareup.okhttp.internal.framed.ErrorCode
-
- All Implemented Interfaces:
Serializable,Comparable<ErrorCode>
public enum ErrorCode extends Enum<ErrorCode>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CANCELCOMPRESSION_ERRORCONNECT_ERRORENHANCE_YOUR_CALMFLOW_CONTROL_ERRORFRAME_TOO_LARGEHTTP_1_1_REQUIREDINADEQUATE_SECURITYINTERNAL_ERRORINVALID_CREDENTIALSINVALID_STREAMA subtype of PROTOCOL_ERROR used by SPDY.NO_ERRORNot an error!PROTOCOL_ERRORREFUSED_STREAMSTREAM_ALREADY_CLOSEDA subtype of PROTOCOL_ERROR used by SPDY.STREAM_CLOSEDSTREAM_IN_USEA subtype of PROTOCOL_ERROR used by SPDY.UNSUPPORTED_VERSIONA subtype of PROTOCOL_ERROR used by SPDY.
-
Field Summary
Fields Modifier and Type Field Description inthttpCodeintspdyGoAwayCodeintspdyRstCode
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ErrorCodefromHttp2(int code)static ErrorCodefromSpdy3Rst(int code)static ErrorCodefromSpdyGoAway(int code)static ErrorCodevalueOf(String name)Returns the enum constant of this type with the specified name.static ErrorCode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NO_ERROR
public static final ErrorCode NO_ERROR
Not an error! For SPDY stream resets, prefer null over NO_ERROR.
-
PROTOCOL_ERROR
public static final ErrorCode PROTOCOL_ERROR
-
INVALID_STREAM
public static final ErrorCode INVALID_STREAM
A subtype of PROTOCOL_ERROR used by SPDY.
-
UNSUPPORTED_VERSION
public static final ErrorCode UNSUPPORTED_VERSION
A subtype of PROTOCOL_ERROR used by SPDY.
-
STREAM_IN_USE
public static final ErrorCode STREAM_IN_USE
A subtype of PROTOCOL_ERROR used by SPDY.
-
STREAM_ALREADY_CLOSED
public static final ErrorCode STREAM_ALREADY_CLOSED
A subtype of PROTOCOL_ERROR used by SPDY.
-
INTERNAL_ERROR
public static final ErrorCode INTERNAL_ERROR
-
FLOW_CONTROL_ERROR
public static final ErrorCode FLOW_CONTROL_ERROR
-
STREAM_CLOSED
public static final ErrorCode STREAM_CLOSED
-
FRAME_TOO_LARGE
public static final ErrorCode FRAME_TOO_LARGE
-
REFUSED_STREAM
public static final ErrorCode REFUSED_STREAM
-
CANCEL
public static final ErrorCode CANCEL
-
COMPRESSION_ERROR
public static final ErrorCode COMPRESSION_ERROR
-
CONNECT_ERROR
public static final ErrorCode CONNECT_ERROR
-
ENHANCE_YOUR_CALM
public static final ErrorCode ENHANCE_YOUR_CALM
-
INADEQUATE_SECURITY
public static final ErrorCode INADEQUATE_SECURITY
-
HTTP_1_1_REQUIRED
public static final ErrorCode HTTP_1_1_REQUIRED
-
INVALID_CREDENTIALS
public static final ErrorCode INVALID_CREDENTIALS
-
-
Method Detail
-
values
public static ErrorCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ErrorCode c : ErrorCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ErrorCode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
fromSpdy3Rst
public static ErrorCode fromSpdy3Rst(int code)
-
fromHttp2
public static ErrorCode fromHttp2(int code)
-
fromSpdyGoAway
public static ErrorCode fromSpdyGoAway(int code)
-
-