Package io.undertow.websockets.core
Class CloseMessage
- java.lang.Object
-
- io.undertow.websockets.core.CloseMessage
-
public class CloseMessage extends Object
A close message- Author:
- Stuart Douglas
-
-
Field Summary
Fields 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 Summary
Constructors Constructor Description CloseMessage(int code, String reason)
CloseMessage(ByteBuffer buffer)
CloseMessage(ByteBuffer[] buffers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCode()
String
getReason()
static boolean
isValid(int code)
Returntrue
if the provided code is a valid close status code.ByteBuffer
toByteBuffer()
-
-
-
Field Detail
-
NORMAL_CLOSURE
public static final int NORMAL_CLOSURE
- See Also:
- Constant Field Values
-
GOING_AWAY
public static final int GOING_AWAY
- See Also:
- Constant Field Values
-
WRONG_CODE
public static final int WRONG_CODE
- See Also:
- Constant Field Values
-
PROTOCOL_ERROR
public static final int PROTOCOL_ERROR
- See Also:
- Constant Field Values
-
MSG_CONTAINS_INVALID_DATA
public static final int MSG_CONTAINS_INVALID_DATA
- See Also:
- Constant Field Values
-
MSG_VIOLATES_POLICY
public static final int MSG_VIOLATES_POLICY
- See Also:
- Constant Field Values
-
MSG_TOO_BIG
public static final int MSG_TOO_BIG
- See Also:
- Constant Field Values
-
MISSING_EXTENSIONS
public static final int MISSING_EXTENSIONS
- See Also:
- Constant Field Values
-
UNEXPECTED_ERROR
public static final int UNEXPECTED_ERROR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CloseMessage
public CloseMessage(ByteBuffer buffer)
-
CloseMessage
public CloseMessage(int code, String reason)
-
CloseMessage
public CloseMessage(ByteBuffer[] buffers)
-
-
Method Detail
-
getReason
public String getReason()
-
getCode
public int getCode()
-
toByteBuffer
public ByteBuffer toByteBuffer()
-
isValid
public static boolean isValid(int code)
Returntrue
if the provided code is a valid close status code.
-
-