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_PHRASEUTF-8 bytes if needed.CloseInfo(ByteBuffer payload, boolean validate) Parse the Close Frame payload. -
Method Summary
Modifier and TypeMethodDescriptionprivate ByteBufferasFrame()private voidassertValidStatusCode(int statusCode) intbooleanbooleanisHarsh()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_PHRASEUTF-8 bytes if needed.- Parameters:
statusCode- the status codereason- the raw reason code
-
-
Method Details
-
assertValidStatusCode
private void assertValidStatusCode(int statusCode) -
asByteBuffer
-
asFrame
-
getReason
-
getStatusCode
public int getStatusCode() -
isHarsh
public boolean isHarsh() -
isAbnormal
public boolean isAbnormal() -
toString
-