CloseReason.CloseCodes (Apache Tomcat 7.0.104 API Documentation)

javax.websocket

## Enum CloseReason.CloseCodes

- java.lang.Object
- - java.lang.Enum<CloseReason.CloseCodes>
  - - javax.websocket.CloseReason.CloseCodes

- All Implemented Interfaces:
    Serializable, Comparable<CloseReason.CloseCodes>, CloseReason.CloseCode
  Enclosing class:
    CloseReason

      public static enum CloseReason.CloseCodes
      extends Enum<CloseReason.CloseCodes>
      implements CloseReason.CloseCode

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `CANNOT_ACCEPT`
    `CLOSED_ABNORMALLY`
    `GOING_AWAY`
    `NO_EXTENSION`
    `NO_STATUS_CODE`
    `NORMAL_CLOSURE`
    `NOT_CONSISTENT`
    `PROTOCOL_ERROR`
    `RESERVED`
    `SERVICE_RESTART`
    `TLS_HANDSHAKE_FAILURE`
    `TOO_BIG`
    `TRY_AGAIN_LATER`
    `UNEXPECTED_CONDITION`
    `VIOLATED_POLICY`

  - ### Method Summary

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

    - #### NORMAL_CLOSURE

          public static final CloseReason.CloseCodes NORMAL_CLOSURE

    - #### GOING_AWAY

          public static final CloseReason.CloseCodes GOING_AWAY

    - #### PROTOCOL_ERROR

          public static final CloseReason.CloseCodes PROTOCOL_ERROR

    - #### CANNOT_ACCEPT

          public static final CloseReason.CloseCodes CANNOT_ACCEPT

    - #### RESERVED

          public static final CloseReason.CloseCodes RESERVED

    - #### NO_STATUS_CODE

          public static final CloseReason.CloseCodes NO_STATUS_CODE

    - #### CLOSED_ABNORMALLY

          public static final CloseReason.CloseCodes CLOSED_ABNORMALLY

    - #### NOT_CONSISTENT

          public static final CloseReason.CloseCodes NOT_CONSISTENT

    - #### VIOLATED_POLICY

          public static final CloseReason.CloseCodes VIOLATED_POLICY

    - #### TOO_BIG

          public static final CloseReason.CloseCodes TOO_BIG

    - #### NO_EXTENSION

          public static final CloseReason.CloseCodes NO_EXTENSION

    - #### UNEXPECTED_CONDITION

          public static final CloseReason.CloseCodes UNEXPECTED_CONDITION

    - #### SERVICE_RESTART

          public static final CloseReason.CloseCodes SERVICE_RESTART

    - #### TRY_AGAIN_LATER

          public static final CloseReason.CloseCodes TRY_AGAIN_LATER

    - #### TLS_HANDSHAKE_FAILURE

          public static final CloseReason.CloseCodes TLS_HANDSHAKE_FAILURE

  - ### Method Detail

    - #### values

          public static CloseReason.CloseCodes[] 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 (CloseReason.CloseCodes c : CloseReason.CloseCodes.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static CloseReason.CloseCodes 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

    - #### getCloseCode

          public static CloseReason.CloseCode getCloseCode(int code)

    - #### getCode

          public int getCode()

      Specified by:
        `getCode` in interface `CloseReason.CloseCode`

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.