public class CloseMessage extends Object
Modifier and Type | Field | Description |
---|---|---|
static int |
GOING_AWAY |
|
static int |
MISSING_EXTENSIONS |
|
static int |
MSG_CONTAINS_INVALID_DATA |
|
static int |
MSG_TOO_BIG |
|
static int |
MSG_VIOLATES_POLICY |
|
static int |
NORMAL_CLOSURE |
|
static int |
PROTOCOL_ERROR |
|
static int |
UNEXPECTED_ERROR |
|
static int |
WRONG_CODE |
Constructor | Description |
---|---|
CloseMessage(int code,
String reason) |
|
CloseMessage(ByteBuffer buffer) |
|
CloseMessage(ByteBuffer[] buffers) |
Modifier and Type | Method | Description |
---|---|---|
int |
getCode() |
|
String |
getReason() |
|
static boolean |
isValid(int code) |
Return
true if the provided code is a valid close status code. |
ByteBuffer |
toByteBuffer() |
public static final int NORMAL_CLOSURE
public static final int GOING_AWAY
public static final int WRONG_CODE
public static final int PROTOCOL_ERROR
public static final int MSG_CONTAINS_INVALID_DATA
public static final int MSG_VIOLATES_POLICY
public static final int MSG_TOO_BIG
public static final int MISSING_EXTENSIONS
public static final int UNEXPECTED_ERROR
public CloseMessage(ByteBuffer buffer)
public CloseMessage(int code, String reason)
public CloseMessage(ByteBuffer[] buffers)
public String getReason()
public int getCode()
public ByteBuffer toByteBuffer()
public static boolean isValid(int code)
true
if the provided code is a valid close status code.Copyright © 2018. All rights reserved.