Enum H2Error

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

    public enum H2Error
    extends java.lang.Enum<H2Error>
    Errors codes defined by HTTP/2 specification.
    Since:
    5.0
    • Enum Constant Detail

      • NO_ERROR

        public static final H2Error NO_ERROR
        Graceful shutdown

        The associated condition is not as a result of an error.

      • PROTOCOL_ERROR

        public static final H2Error PROTOCOL_ERROR
        Protocol error detected

        The endpoint detected an unspecific protocol error. This error is for use when a more specific error code is not available

      • INTERNAL_ERROR

        public static final H2Error INTERNAL_ERROR
        Implementation fault

        The endpoint encountered an unexpected internal error.

      • FLOW_CONTROL_ERROR

        public static final H2Error FLOW_CONTROL_ERROR
        Flow control limits exceeded.

        The endpoint detected that its peer violated the flow control protocol.

      • SETTINGS_TIMEOUT

        public static final H2Error SETTINGS_TIMEOUT
        Settings not acknowledged.

        The endpoint sent a SETTINGS frame, but did not receive a response in a timely manner.

      • STREAM_CLOSED

        public static final H2Error STREAM_CLOSED
        Frame received for closed stream.

        The endpoint received a frame after a stream was half closed.

      • FRAME_SIZE_ERROR

        public static final H2Error FRAME_SIZE_ERROR
        Frame size incorrect.

        The endpoint received a frame with an invalid size.

      • REFUSED_STREAM

        public static final H2Error REFUSED_STREAM
        Stream not processed

        The endpoint refuses the stream prior to performing any application processing.

      • CANCEL

        public static final H2Error CANCEL
        Stream canceled.

        Used by the endpoint to indicate that the stream is no longer needed

      • COMPRESSION_ERROR

        public static final H2Error COMPRESSION_ERROR
        Compression state not updated.

        The endpoint is unable to maintain the header compression context for the connection.

      • CONNECT_ERROR

        public static final H2Error CONNECT_ERROR
        TCP connection error.

        The connection established in response to a CONNECT request was reset or abnormally closed.

      • ENHANCE_YOUR_CALM

        public static final H2Error ENHANCE_YOUR_CALM
        Processing capacity exceeded.

        The endpoint detected that its peer is exhibiting a behavior that might be generating excessive load.

      • INADEQUATE_SECURITY

        public static final H2Error INADEQUATE_SECURITY
        Negotiated TLS parameters not acceptable.

        The underlying transport has properties that do not meet minimum security requirements.

      • HTTP_1_1_REQUIRED

        public static final H2Error HTTP_1_1_REQUIRED
        Use HTTP/1.1 for the request.

        The endpoint requires that HTTP/1.1 be used instead of HTTP/2.

    • Field Detail

      • code

        int code
      • MAP_BY_CODE

        private static final java.util.concurrent.ConcurrentMap<java.lang.Integer,​H2Error> MAP_BY_CODE
    • Constructor Detail

      • H2Error

        private H2Error​(int code)
    • Method Detail

      • values

        public static H2Error[] 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 (H2Error c : H2Error.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static H2Error 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.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getCode

        public int getCode()
      • getByCode

        public static H2Error getByCode​(int code)