Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-01

weblogic.websocket
Interface ClosingMessage


public interface ClosingMessage

This class represents closing data control frame.


Field Summary
static int NO_STATUS_CODE
          Do not send the status code with the closing handshake.
static int SC_GOING_AWAY
          Indicates that an endpoint is "going away", such as a server is going down or a browser has navigated away from a page.
static int SC_INTERNAL_SERVER_ERROR
          Indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fullfilling the request.
static int SC_INVALID_FRAME_PAYLOAD_DATA
          Indicates that an endpoint is terminating the connection because it has received data within a message that is not consistent with the type of message.
static int SC_MESSAGE_TOO_BIG
          Indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process.
static int SC_NORMAL_CLOSURE
          Indicates a normal closure, meaning that the purpose for which the connection was established has been fulfilled.
static int SC_POLICY_VOILATION
          Indicates that an endpoint is terminating the connection because it has received a message that violates its policy.
static int SC_PROTOCOL_ERROR
          Indicates that an endpoint is terminating the connection due to a protocol error.
static int SC_UNSUPPORTED_DATA
          Indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept (for example, an endpoint that understands only text data may send this if it receives a binary message).
 
Method Summary
 String getReason()
          Get reason of the closing handshake.
 int getStatusCode()
          Get status code of the closing handshake.
 

Field Detail

NO_STATUS_CODE

static final int NO_STATUS_CODE
Do not send the status code with the closing handshake.

See Also:
Constant Field Values

SC_NORMAL_CLOSURE

static final int SC_NORMAL_CLOSURE
Indicates a normal closure, meaning that the purpose for which the connection was established has been fulfilled.

See Also:
Constant Field Values

SC_GOING_AWAY

static final int SC_GOING_AWAY
Indicates that an endpoint is "going away", such as a server is going down or a browser has navigated away from a page.

See Also:
Constant Field Values

SC_PROTOCOL_ERROR

static final int SC_PROTOCOL_ERROR
Indicates that an endpoint is terminating the connection due to a protocol error.

See Also:
Constant Field Values

SC_UNSUPPORTED_DATA

static final int SC_UNSUPPORTED_DATA
Indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept (for example, an endpoint that understands only text data may send this if it receives a binary message).

See Also:
Constant Field Values

SC_INVALID_FRAME_PAYLOAD_DATA

static final int SC_INVALID_FRAME_PAYLOAD_DATA
Indicates that an endpoint is terminating the connection because it has received data within a message that is not consistent with the type of message.

See Also:
Constant Field Values

SC_POLICY_VOILATION

static final int SC_POLICY_VOILATION
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 (for example, ClosingMessage.SC_UNSUPPORTED_DATA or 1009) or if there is a need to hide specific details about the policy.

See Also:
Constant Field Values

SC_MESSAGE_TOO_BIG

static final int SC_MESSAGE_TOO_BIG
Indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process.

See Also:
Constant Field Values

SC_INTERNAL_SERVER_ERROR

static final int SC_INTERNAL_SERVER_ERROR
Indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fullfilling the request.

See Also:
Constant Field Values
Method Detail

getStatusCode

int getStatusCode()
Get status code of the closing handshake. ClosingMessage.NO_STATUS_CODE will be returned if there is no status code sent with the closing message.

Returns:
status code

getReason

String getReason()
Get reason of the closing handshake.

Returns:
reason of closing

Copyright 1996, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-01