Class WsCloseFrame
java.lang.Object
org.jdrupes.httpcodec.protocols.websocket.WsFrameHeader
org.jdrupes.httpcodec.protocols.websocket.WsCloseFrame
- All Implemented Interfaces:
MessageHeader
- Direct Known Subclasses:
WsCloseResponse
Represents a WebSocket close frame.
Note that status code and reason are modeled as part of the header in this API although they are handled like payload by the “wire protocol”.
-
Constructor Summary
ConstructorDescriptionWsCloseFrame
(Integer statusCode, CharBuffer reason) Creates a new close control frame. -
Method Summary
-
Constructor Details
-
WsCloseFrame
Creates a new close control frame.- Parameters:
statusCode
- the status code (if any)reason
- the reason (if any)
-
-
Method Details
-
hasPayload
Description copied from interface:MessageHeader
Returns true if the complete message comprises additional data inBuffer
s when decoded or encoded.- Returns:
- true if payload data follows
-
isFinal
Description copied from interface:MessageHeader
Returns true if this is the final message received or transmitted on a connection.- Returns:
- the result
-
statusCode
- Returns:
- the statusCode
-
reason
- Returns:
- the reason
-
toString
-