Constants (Apache Tomcat 7.0.104 API Documentation)

org.apache.catalina.websocket

## Class Constants

- java.lang.Object
- - org.apache.catalina.websocket.Constants

- Deprecated.
  Replaced by the JSR356 WebSocket 1.1 implementation and will be removed in Tomcat 8.0.x.

      @Deprecated
      public class Constants
      extends Object

  Constants for this Java package.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static byte` | `OPCODE_BINARY` Deprecated.
    `static byte` | `OPCODE_CLOSE` Deprecated.
    `static byte` | `OPCODE_CONTINUATION` Deprecated.
    `static byte` | `OPCODE_PING` Deprecated.
    `static byte` | `OPCODE_PONG` Deprecated.
    `static byte` | `OPCODE_TEXT` Deprecated.
    `static String` | `Package` Deprecated.
    `static int` | `STATUS_BAD_DATA` Deprecated. 1007 indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [RFC3629] data within a text message).
    `static int` | `STATUS_CLOSE_NORMAL` Deprecated. 1000 indicates a normal closure, meaning whatever purpose the connection was established for has been fulfilled.
    `static int` | `STATUS_CLOSED_UNEXPECTEDLY` Deprecated. 1006 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint.
    `static int` | `STATUS_CODE_MISSING` Deprecated. 1005 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint.
    `static int` | `STATUS_MESSAGE_TOO_LARGE` Deprecated. 1009 indicates that an endpoint is terminating the connection because it has received a message which is too big for it to process.
    `static int` | `STATUS_POLICY_VIOLATION` Deprecated. 1008 indicates that an endpoint is terminating the connection because it has received a message that violates its policy.
    `static int` | `STATUS_PROTOCOL_ERROR` Deprecated. 1002 indicates that an endpoint is terminating the connection due to a protocol error.
    `static int` | `STATUS_REQUIRED_EXTENSION` Deprecated. 1010 indicates that an endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake.
    `static int` | `STATUS_SHUTDOWN` Deprecated. 1001 indicates that an endpoint is "going away", such as a server going down, or a browser having navigated away from a page.
    `static int` | `STATUS_UNEXPECTED_CONDITION` Deprecated. 1011 indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.
    `static int` | `STATUS_UNEXPECTED_DATA_TYPE` Deprecated. 1003 indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept (e.g. an endpoint that understands only text data MAY send this if it receives a binary message).

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Constants()` Deprecated.

  - ### Method Summary

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### Package

          public static final String Package

      Deprecated.
      See Also:
        Constant Field Values

    - #### OPCODE_CONTINUATION

          public static final byte OPCODE_CONTINUATION

      Deprecated.
      See Also:
        Constant Field Values

    - #### OPCODE_TEXT

          public static final byte OPCODE_TEXT

      Deprecated.
      See Also:
        Constant Field Values

    - #### OPCODE_BINARY

          public static final byte OPCODE_BINARY

      Deprecated.
      See Also:
        Constant Field Values

    - #### OPCODE_CLOSE

          public static final byte OPCODE_CLOSE

      Deprecated.
      See Also:
        Constant Field Values

    - #### OPCODE_PING

          public static final byte OPCODE_PING

      Deprecated.
      See Also:
        Constant Field Values

    - #### OPCODE_PONG

          public static final byte OPCODE_PONG

      Deprecated.
      See Also:
        Constant Field Values

    - #### STATUS_CLOSE_NORMAL

          public static final int STATUS_CLOSE_NORMAL

      Deprecated.
      1000 indicates a normal closure, meaning whatever purpose the connection was established for has been fulfilled.
      See Also:
        Constant Field Values

    - #### STATUS_SHUTDOWN

          public static final int STATUS_SHUTDOWN

      Deprecated.
      1001 indicates that an endpoint is "going away", such as a server going down, or a browser having navigated away from a page.
      See Also:
        Constant Field Values

    - #### STATUS_PROTOCOL_ERROR

          public static final int STATUS_PROTOCOL_ERROR

      Deprecated.
      1002 indicates that an endpoint is terminating the connection due to a protocol error.
      See Also:
        Constant Field Values

    - #### STATUS_UNEXPECTED_DATA_TYPE

          public static final int STATUS_UNEXPECTED_DATA_TYPE

      Deprecated.
      1003 indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept (e.g. an endpoint that understands only text data MAY send this if it receives a binary message).
      See Also:
        Constant Field Values

    - #### STATUS_CODE_MISSING

          public static final int STATUS_CODE_MISSING

      Deprecated.
      1005 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint. It is designated for use in applications expecting a status code to indicate that no status code was actually present.
      See Also:
        Constant Field Values

    - #### STATUS_CLOSED_UNEXPECTEDLY

          public static final int STATUS_CLOSED_UNEXPECTEDLY

      Deprecated.
      1006 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint. It is designated for use in applications expecting a status code to indicate that the connection was closed abnormally, e.g. without sending or receiving a Close control frame.
      See Also:
        Constant Field Values

    - #### STATUS_BAD_DATA

          public static final int STATUS_BAD_DATA

      Deprecated.
      1007 indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [RFC3629] data within a text message).
      See Also:
        Constant Field Values

    - #### STATUS_POLICY_VIOLATION

          public static final int STATUS_POLICY_VIOLATION

      Deprecated.
      1008 indicates that an endpoint is terminating the connection because it has received a message that violates its policy. This is a generic status code that can be returned when there is no other more suitable status code (e.g. 1003 or 1009), or if there is a need to hide specific details about the policy.
      See Also:
        Constant Field Values

    - #### STATUS_MESSAGE_TOO_LARGE

          public static final int STATUS_MESSAGE_TOO_LARGE

      Deprecated.
      1009 indicates that an endpoint is terminating the connection because it has received a message which is too big for it to process.
      See Also:
        Constant Field Values

    - #### STATUS_REQUIRED_EXTENSION

          public static final int STATUS_REQUIRED_EXTENSION

      Deprecated.
      1010 indicates that an endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake. The list of extensions which are needed SHOULD appear in the /reason/ part of the Close frame. Note that this status code is not used by the server, because it can fail the WebSocket handshake instead.
      See Also:
        Constant Field Values

    - #### STATUS_UNEXPECTED_CONDITION

          public static final int STATUS_UNEXPECTED_CONDITION

      Deprecated.
      1011 indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Constants

          public Constants()

      Deprecated.

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