public class CloseStatus extends Object
| Modifier and Type | Field and Description |
|---|---|
static CloseStatus |
ABNORMAL_CLOSE |
static CloseStatus |
NORMAL_CLOSE |
| Constructor and Description |
|---|
CloseStatus(int code,
String reason)
Create a new
CloseStatus instance. |
| Modifier and Type | Method and Description |
|---|---|
int |
getCode()
Return the websocket close code.
|
Optional<String> |
getReason()
Return a websocket close reason, if present.
|
String |
toString() |
public static final CloseStatus NORMAL_CLOSE
public static final CloseStatus ABNORMAL_CLOSE
public CloseStatus(int code,
@Nullable
String reason)
CloseStatus instance.code - the status codereason - the reason