org.apache.hc.core5.http2

## Enum H2Error

- java.lang.Object
- - java.lang.Enum<H2Error>
  - - org.apache.hc.core5.http2.H2Error

- All Implemented Interfaces:
    Serializable, Comparable<H2Error>

      public enum H2Error
      extends Enum<H2Error>

  Errors codes defined by HTTP/2 specification.
  Since:
    5.0

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `CANCEL` Stream canceled.
    `COMPRESSION_ERROR` Compression state not updated.
    `CONNECT_ERROR` TCP connection error.
    `ENHANCE_YOUR_CALM` Processing capacity exceeded.
    `FLOW_CONTROL_ERROR` Flow control limits exceeded.
    `FRAME_SIZE_ERROR` Frame size incorrect.
    `HTTP_1_1_REQUIRED` Use HTTP/1.1 for the request.
    `INADEQUATE_SECURITY` Negotiated TLS parameters not acceptable.
    `INTERNAL_ERROR` Implementation fault
    `NO_ERROR` Graceful shutdown
    `PROTOCOL_ERROR` Protocol error detected
    `REFUSED_STREAM` Stream not processed
    `SETTINGS_TIMEOUT` Settings not acknowledged.
    `STREAM_CLOSED` Frame received for closed stream.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static H2Error` | `getByCode(int code)`
    `int` | `getCode()`
    `static H2Error` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static H2Error[]` | `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 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.

  - ### 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(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 name
        `NullPointerException` - if the argument is null

    - #### getCode

          public int getCode()

    - #### getByCode

          public static H2Error getByCode(int code)

Copyright © 2005–2020 The Apache Software Foundation. All rights reserved.