Interface WebSocketFrame.Factory
- Enclosing interface:
WebSocketFrame
A factory used to create WebSocket frame.
It allows to create frames that comply with the configuration (e.g. max frame size...).
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptiondefault WebSocketFrame
Creates a final binary frame with the specified payload data.Creates a binary frame with the specified payload data.continuation
(ByteBuf data, boolean finalFragment) Creates a continuation frame with the specified payload data.Creates a ping frame with the specified payload data.Creates a pong frame with the specified payload data.default WebSocketFrame
Creates a final text frame with the specified payload data.Creates a text frame with the specified payload data.default WebSocketFrame
Creates a final text frame with the specified payload data.default WebSocketFrame
Creates a text frame with the specified payload data.
-
Method Details
-
binary
Creates a final binary frame with the specified payload data.
- Parameters:
data
- payload data- Returns:
- a new WebSocket frame
- Throws:
WebSocketException
- if there was an error creating the frame
-
binary
Creates a binary frame with the specified payload data.
- Parameters:
data
- payload datafinalFragment
- true to create a final frame, false otherwise- Returns:
- a new WebSocket frame
- Throws:
WebSocketException
- if there was an error creating the frame
-
text
Creates a final text frame with the specified payload data.
- Parameters:
text
- payload data- Returns:
- a new WebSocket frame
- Throws:
WebSocketException
- if there was an error creating the frame
-
text
Creates a text frame with the specified payload data.
- Parameters:
text
- payload datafinalFragment
- true to create a final frame, false otherwise- Returns:
- a new WebSocket frame
- Throws:
WebSocketException
- if there was an error creating the frame
-
text
Creates a final text frame with the specified payload data.
- Parameters:
data
- payload data- Returns:
- a new WebSocket frame
- Throws:
WebSocketException
- if there was an error creating the frame
-
text
Creates a text frame with the specified payload data.
- Parameters:
data
- payload datafinalFragment
- true to create a final frame, false otherwise- Returns:
- a new WebSocket frame
- Throws:
WebSocketException
- if there was an error creating the frame
-
continuation
Creates a continuation frame with the specified payload data.
- Parameters:
data
- payload datafinalFragment
- true to create a final frame, false otherwise- Returns:
- a new WebSocket frame
- Throws:
WebSocketException
- if there was an error creating the frame
-
ping
Creates a ping frame with the specified payload data.
Note that a ping frame must have a payload length of 125 bytes or less as defined by RFC 6455 Section 5.5.
- Parameters:
data
- payload data- Returns:
- a new WebSocket frame
- Throws:
WebSocketException
- if there was an error creating the frame
-
pong
Creates a pong frame with the specified payload data.
Note that a pong frame must have a payload length of 125 bytes or less as defined by RFC 6455 Section 5.5.
- Parameters:
data
- payload data- Returns:
- a new WebSocket frame
- Throws:
WebSocketException
- if there was an error creating the frame
-