Package jakarta.websocket

# Enum CloseReason.CloseCodes

java.lang.Object
java.lang.Enum<CloseReason.CloseCodes>
jakarta.websocket.CloseReason.CloseCodes

All Implemented Interfaces:
  `CloseReason.CloseCode`, `Serializable`, `Comparable<CloseReason.CloseCodes>`, `java.lang.constant.Constable`

Enclosing class:
  CloseReason

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

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
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

Modifier and Type
Method
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, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### 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 Details

### values

public static CloseReason.CloseCodes[] values()
Returns an array containing the constants of this enum type, in the order they are declared.

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`