Package ej.websocket.frame
Interface IFrameBuilder
-
- All Known Implementing Classes:
ClientFrameBuilder
public interface IFrameBuilderAn IFrameBuilder knows how to create different kind of frames.
-
-
Field Summary
Fields Modifier and Type Field Description static intEXTENDED_LENGTH_MAX_VALUEThe maximum length for an extended payload (7+16 bits).
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RawFramebuildBinaryFrame(byte[] binary)See RFC6455, section 5.6.RawFramebuildCloseFrame(ReasonForClosure reasonForClosure)See RFC6455, section 7.RawFramebuildPingFrame(byte[] payload)See RFC6455, section 5.5.2.RawFramebuildPongFrame(byte[] payload)See RFC6455, section 5.5.3.RawFramebuildTextFrame(String text)See RFC6455, section 5.6.
-
-
-
Field Detail
-
EXTENDED_LENGTH_MAX_VALUE
static final int EXTENDED_LENGTH_MAX_VALUE
The maximum length for an extended payload (7+16 bits).- See Also:
- Constant Field Values
-
-
Method Detail
-
buildBinaryFrame
RawFrame buildBinaryFrame(byte[] binary)
See RFC6455, section 5.6. Data Frames.- Parameters:
binary- the binary data to create a binary frame- Returns:
- the properly constructed frame
-
buildCloseFrame
RawFrame buildCloseFrame(ReasonForClosure reasonForClosure)
See RFC6455, section 7. Closing the Connection.- Parameters:
reasonForClosure- the status code and the optional message to send to the remote endpoint- Returns:
- the properly constructed frame
-
buildPingFrame
RawFrame buildPingFrame(byte[] payload)
See RFC6455, section 5.5.2. Ping.- Parameters:
payload- the payload of the frame- Returns:
- the properly constructed frame
-
buildPongFrame
RawFrame buildPongFrame(byte[] payload)
See RFC6455, section 5.5.3. Pong.- Parameters:
payload- the payload of the frame- Returns:
- the properly constructed frame
-
-