Enum Class WebSocketCloseCode

java.lang.Object
java.lang.Enum<WebSocketCloseCode>
cool.scx.http.WebSocketCloseCode
All Implemented Interfaces:
Serializable, Comparable<WebSocketCloseCode>, Constable

public enum WebSocketCloseCode extends Enum<WebSocketCloseCode>
  • Enum Constant Details

    • NORMAL_CLOSE

      public static final WebSocketCloseCode NORMAL_CLOSE
      Code to use with ScxWebSocket.close(int, String) to indicate normal close operation.
    • GOING_AWAY

      public static final WebSocketCloseCode GOING_AWAY
      Client is leaving (browser tab closing).
    • PROTOCOL_ERROR

      public static final WebSocketCloseCode PROTOCOL_ERROR
      Endpoint received a malformed frame.
    • CANNOT_ACCEPT

      public static final WebSocketCloseCode CANNOT_ACCEPT
      Endpoint received an unsupported frame (e.g. binary-only endpoint received text frame).
    • NO_STATUS_CODE

      public static final WebSocketCloseCode NO_STATUS_CODE
      Expected close status, received none.
    • CLOSED_ABNORMALLY

      public static final WebSocketCloseCode CLOSED_ABNORMALLY
      No close code frame has been received.
    • NOT_CONSISTENT

      public static final WebSocketCloseCode NOT_CONSISTENT
      Endpoint received inconsistent message (e.g. malformed UTF-8).
    • VIOLATED_POLICY

      public static final WebSocketCloseCode VIOLATED_POLICY
      Generic code used for situations other than 1003 and 1009.
    • TOO_BIG

      public static final WebSocketCloseCode TOO_BIG
      Endpoint won't process large frame.
    • NO_EXTENSION

      public static final WebSocketCloseCode NO_EXTENSION
      Client wanted an extension which server did not negotiate.
    • UNEXPECTED_CONDITION

      public static final WebSocketCloseCode UNEXPECTED_CONDITION
      Internal server error while operating.
    • SERVICE_RESTART

      public static final WebSocketCloseCode SERVICE_RESTART
      Server/service is restarting.
    • TRY_AGAIN_LATER

      public static final WebSocketCloseCode TRY_AGAIN_LATER
      Temporary server condition forced blocking client's request.
    • BAD_GATEWAY

      public static final WebSocketCloseCode BAD_GATEWAY
      Server acting as gateway received an invalid response.
    • TLS_HANDSHAKE_FAIL

      public static final WebSocketCloseCode TLS_HANDSHAKE_FAIL
      Transport Layer Security handshake failure.
    • RESERVED_FOR_LATER_MIN

      public static final WebSocketCloseCode RESERVED_FOR_LATER_MIN
      Reserved for later min value.
    • RESERVED_FOR_LATER_MAX

      public static final WebSocketCloseCode RESERVED_FOR_LATER_MAX
      Reserved for later max value.
    • RESERVED_FOR_EXTENSIONS_MIN

      public static final WebSocketCloseCode RESERVED_FOR_EXTENSIONS_MIN
      Reserved for extensions min value.
    • RESERVED_FOR_EXTENSIONS_MAX

      public static final WebSocketCloseCode RESERVED_FOR_EXTENSIONS_MAX
      Reserved for extensions max value.
    • REGISTERED_AT_IANA_MIN

      public static final WebSocketCloseCode REGISTERED_AT_IANA_MIN
      Registered at IANA min value.
    • REGISTERED_AT_IANA_MAX

      public static final WebSocketCloseCode REGISTERED_AT_IANA_MAX
      Registered at IANA max value.
    • APPLICATION_MIN

      public static final WebSocketCloseCode APPLICATION_MIN
      Application min value.
    • APPLICATION_MAX

      public static final WebSocketCloseCode APPLICATION_MAX
      Application max value.
  • Method Details

    • values

      public static WebSocketCloseCode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static WebSocketCloseCode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • code

      public int code()
    • reason

      public String reason()