Apache Tomcat 7.0.28

org.apache.catalina.websocket
Class Constants

java.lang.Object
  extended by org.apache.catalina.websocket.Constants

public class Constants
extends Object

Constants for this Java package.


Field Summary
static byte OPCODE_BINARY
           
static byte OPCODE_CLOSE
           
static byte OPCODE_CONTINUATION
           
static byte OPCODE_PING
           
static byte OPCODE_PONG
           
static byte OPCODE_TEXT
           
static String Package
           
static int STATUS_BAD_DATA
          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
          1000 indicates a normal closure, meaning whatever purpose the connection was established for has been fulfilled.
static int STATUS_CLOSED_UNEXPECTEDLY
          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
          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
          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
          1008 indicates that an endpoint is terminating the connection because it has received a message that violates its policy.
static int STATUS_PROTOCOL_ERROR
          1002 indicates that an endpoint is terminating the connection due to a protocol error.
static int STATUS_REQUIRED_EXTENSION
          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
          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
          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
          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
Constants()
           
 
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
See Also:
Constant Field Values

OPCODE_CONTINUATION

public static final byte OPCODE_CONTINUATION
See Also:
Constant Field Values

OPCODE_TEXT

public static final byte OPCODE_TEXT
See Also:
Constant Field Values

OPCODE_BINARY

public static final byte OPCODE_BINARY
See Also:
Constant Field Values

OPCODE_CLOSE

public static final byte OPCODE_CLOSE
See Also:
Constant Field Values

OPCODE_PING

public static final byte OPCODE_PING
See Also:
Constant Field Values

OPCODE_PONG

public static final byte OPCODE_PONG
See Also:
Constant Field Values

STATUS_CLOSE_NORMAL

public static final int STATUS_CLOSE_NORMAL
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
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
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
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
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
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
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
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
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
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
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()

Apache Tomcat 7.0.28

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