Class CloseInfo
java.lang.Object
org.eclipse.jetty.websocket.common.CloseInfo
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCloseInfo
(int statusCode) Create a CloseInfo, trimming the reason toCloseStatus.MAX_REASON_PHRASE
UTF-8 bytes if needed.CloseInfo
(ByteBuffer payload, boolean validate) Parse the Close Frame payload. -
Method Summary
Modifier and TypeMethodDescriptionprivate ByteBuffer
asFrame()
private void
assertValidStatusCode
(int statusCode) int
boolean
boolean
isHarsh()
toString()
-
Field Details
-
statusCode
private int statusCode -
reasonBytes
private byte[] reasonBytes
-
-
Constructor Details
-
CloseInfo
public CloseInfo() -
CloseInfo
Parse the Close Frame payload.- Parameters:
payload
- the raw close frame payload.validate
- true if payload should be validated per WebSocket spec.
-
CloseInfo
-
CloseInfo
-
CloseInfo
public CloseInfo(int statusCode) -
CloseInfo
Create a CloseInfo, trimming the reason toCloseStatus.MAX_REASON_PHRASE
UTF-8 bytes if needed.- Parameters:
statusCode
- the status codereason
- the raw reason code
-
-
Method Details