Class CloseInfo
- java.lang.Object
-
- org.eclipse.jetty.websocket.common.CloseInfo
-
public class CloseInfo extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description CloseInfo()
CloseInfo(int statusCode)
CloseInfo(int statusCode, java.lang.String reason)
Create a CloseInfo, trimming the reason toCloseStatus.MAX_REASON_PHRASE
UTF-8 bytes if needed.CloseInfo(java.nio.ByteBuffer payload, boolean validate)
Parse the Close Frame payload.CloseInfo(Frame frame)
CloseInfo(Frame frame, boolean validate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CloseFrame
asFrame()
java.lang.String
getReason()
int
getStatusCode()
boolean
isAbnormal()
boolean
isHarsh()
java.lang.String
toString()
-
-
-
Constructor Detail
-
CloseInfo
public CloseInfo()
-
CloseInfo
public CloseInfo(java.nio.ByteBuffer payload, boolean validate)
Parse the Close Frame payload.- Parameters:
payload
- the raw close frame payload.validate
- true if payload should be validated per WebSocket spec.
-
CloseInfo
public CloseInfo(Frame frame)
-
CloseInfo
public CloseInfo(Frame frame, boolean validate)
-
CloseInfo
public CloseInfo(int statusCode)
-
CloseInfo
public CloseInfo(int statusCode, java.lang.String reason)
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 Detail
-
asFrame
public CloseFrame asFrame()
-
getReason
public java.lang.String getReason()
-
getStatusCode
public int getStatusCode()
-
isHarsh
public boolean isHarsh()
-
isAbnormal
public boolean isAbnormal()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-