Enum ErrorCode

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ErrorCode>

    public enum ErrorCode
    extends java.lang.Enum<ErrorCode>
    Standard HTTP/2 error codes.
    • Field Summary

      Modifier and Type Field Description
      int code  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ErrorCode from​(int error)  
      static java.lang.String toString​(int error, java.lang.String dft)  
      static ErrorCode valueOf​(java.lang.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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • NO_ERROR

        public static final ErrorCode NO_ERROR
        Indicates no errors.

        public static final ErrorCode PROTOCOL_ERROR
        Indicates a generic HTTP/2 protocol violation.

        public static final ErrorCode INTERNAL_ERROR
        Indicates an internal error.

        public static final ErrorCode FLOW_CONTROL_ERROR
        Indicates an HTTP/2 flow control violation.

        public static final ErrorCode SETTINGS_TIMEOUT_ERROR
        Indicates that a SETTINGS frame did not receive a reply in a timely manner.

        public static final ErrorCode STREAM_CLOSED_ERROR
        Indicates that a stream frame has been received after the stream was closed.

        public static final ErrorCode FRAME_SIZE_ERROR
        Indicates that a frame has an invalid length.

        public static final ErrorCode REFUSED_STREAM_ERROR
        Indicates that a stream was rejected before application processing.

        public static final ErrorCode CANCEL_STREAM_ERROR
        Indicates that a stream is no longer needed.

        public static final ErrorCode COMPRESSION_ERROR
        Indicates inability to maintain the HPACK compression context.

        public static final ErrorCode HTTP_CONNECT_ERROR
        Indicates that the connection established by an HTTP CONNECT was abnormally closed.

        public static final ErrorCode ENHANCE_YOUR_CALM_ERROR
        Indicates that the other peer might be generating excessive load.

        public static final ErrorCode INADEQUATE_SECURITY_ERROR
        Indicates that the transport properties do not meet minimum security requirements.

        public static final ErrorCode HTTP_1_1_REQUIRED_ERROR
        Indicates that HTTP/1.1 must be used rather than HTTP/2.
    • Field Detail

      • code

        public final int code
    • 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())
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ErrorCode valueOf​(java.lang.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.)
        name - the name of the enum constant to be returned.
        the enum constant with the specified name
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • from

        public static ErrorCode from​(int error)
      • toString

        public static java.lang.String toString​(int error,
                                                java.lang.String dft)