javax.net.websocket
Enum CloseReason.Code

java.lang.Object
  extended by java.lang.Enum<CloseReason.Code>
      extended by javax.net.websocket.CloseReason.Code
All Implemented Interfaces:
Serializable, Comparable<CloseReason.Code>
Enclosing class:
CloseReason

public static enum CloseReason.Code
extends Enum<CloseReason.Code>

Enumeration of status codes for a web socket close.


Enum Constant Summary
CANNOT_ACCEPT
           
CLOSED_ABNORMALLY
           
GOING_AWAY
           
NO_EXTENSION
           
NO_STATUS_CODE
           
NORMAL_CLOSURE
           
NOT_CONSISTENT
           
PROTOCOL_ERROR
           
RESERVED
           
TLS_HANDSHAKE_FAILURE
           
TOO_BIG
           
UNEXPECTED_CONDITION
           
VIOLATED_POLICY
           
 
Method Summary
 int getCode()
          Return the code number of this status code.
static CloseReason.Code valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CloseReason.Code[] 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.Code NORMAL_CLOSURE

GOING_AWAY

public static final CloseReason.Code GOING_AWAY

PROTOCOL_ERROR

public static final CloseReason.Code PROTOCOL_ERROR

CANNOT_ACCEPT

public static final CloseReason.Code CANNOT_ACCEPT

RESERVED

public static final CloseReason.Code RESERVED

NO_STATUS_CODE

public static final CloseReason.Code NO_STATUS_CODE

CLOSED_ABNORMALLY

public static final CloseReason.Code CLOSED_ABNORMALLY

NOT_CONSISTENT

public static final CloseReason.Code NOT_CONSISTENT

VIOLATED_POLICY

public static final CloseReason.Code VIOLATED_POLICY

TOO_BIG

public static final CloseReason.Code TOO_BIG

NO_EXTENSION

public static final CloseReason.Code NO_EXTENSION

UNEXPECTED_CONDITION

public static final CloseReason.Code UNEXPECTED_CONDITION

TLS_HANDSHAKE_FAILURE

public static final CloseReason.Code TLS_HANDSHAKE_FAILURE
Method Detail

values

public static CloseReason.Code[] 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.Code c : CloseReason.Code.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.Code 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()
Return the code number of this status code.



Copyright © 2012. All Rights Reserved.