public class WebSocketFrame extends Object
A WebSocket message is composed of one or more WebSocket frames.
If there is a just a single frame in the message then a single text or binary frame should be created with final = true.
If there are more than one frames in the message, then the first frame should be a text or binary frame with final = false, followed by one or more continuation frames. The last continuation frame should have final = true.
NOTE: This class has been automatically generated from theoriginal
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<WebSocketFrame> |
__TYPE_ARG |
Constructor and Description |
---|
WebSocketFrame(Object delegate) |
WebSocketFrame(WebSocketFrame delegate) |
Modifier and Type | Method and Description |
---|---|
Buffer |
binaryData() |
static WebSocketFrame |
binaryFrame(Buffer data,
boolean isFinal)
Create a binary WebSocket frame.
|
String |
closeReason() |
short |
closeStatusCode() |
static WebSocketFrame |
continuationFrame(Buffer data,
boolean isFinal)
Create a continuation frame
|
boolean |
equals(Object o) |
WebSocketFrame |
getDelegate() |
int |
hashCode() |
boolean |
isBinary() |
boolean |
isClose() |
boolean |
isContinuation() |
boolean |
isFinal() |
boolean |
isPing() |
boolean |
isText() |
static WebSocketFrame |
newInstance(WebSocketFrame arg) |
static WebSocketFrame |
pingFrame(Buffer data)
Create a ping WebSocket frame.
|
static WebSocketFrame |
pongFrame(Buffer data)
Create a pong WebSocket frame.
|
String |
textData() |
static WebSocketFrame |
textFrame(String str,
boolean isFinal)
Create a text WebSocket frame.
|
String |
toString() |
WebSocketFrameType |
type() |
public static final io.vertx.lang.rx.TypeArg<WebSocketFrame> __TYPE_ARG
public WebSocketFrame(WebSocketFrame delegate)
public WebSocketFrame(Object delegate)
public WebSocketFrame getDelegate()
public static WebSocketFrame binaryFrame(Buffer data, boolean isFinal)
data
- the data for the frameisFinal
- true if it's the final frame in the WebSocket messagepublic static WebSocketFrame textFrame(String str, boolean isFinal)
str
- the string for the frameisFinal
- true if it's the final frame in the WebSocket messagepublic static WebSocketFrame pingFrame(Buffer data)
data
- the bytes for the frame, may be at most 125 bytespublic static WebSocketFrame pongFrame(Buffer data)
data
- the bytes for the frame, may be at most 125 bytespublic static WebSocketFrame continuationFrame(Buffer data, boolean isFinal)
data
- the data for the frameisFinal
- true if it's the final frame in the WebSocket messagepublic WebSocketFrameType type()
public boolean isText()
public boolean isBinary()
public boolean isContinuation()
public boolean isClose()
public boolean isPing()
public String textData()
public Buffer binaryData()
public boolean isFinal()
public short closeStatusCode()
public String closeReason()
public static WebSocketFrame newInstance(WebSocketFrame arg)
Copyright © 2023 Eclipse. All rights reserved.