Package io.vertx.mutiny.core.http
Class WebSocketFrame
java.lang.Object
io.vertx.mutiny.core.http.WebSocketFrame
- All Implemented Interfaces:
MutinyDelegate
A WebSocket frame that represents either text or binary data.
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 Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWebSocketFrame(io.vertx.core.http.WebSocketFrame delegate) WebSocketFrame(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionstatic WebSocketFramebinaryFrame(Buffer data, boolean isFinal) shortstatic WebSocketFramecontinuationFrame(Buffer data, boolean isFinal) booleanio.vertx.core.http.WebSocketFrameinthashCode()booleanisBinary()booleanisClose()booleanbooleanisFinal()booleanisPing()booleanisText()static WebSocketFramenewInstance(io.vertx.core.http.WebSocketFrame arg) static WebSocketFramestatic WebSocketFrametextData()static WebSocketFrametoString()io.vertx.core.http.WebSocketFrameTypetype()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
WebSocketFrame
public WebSocketFrame(io.vertx.core.http.WebSocketFrame delegate) -
WebSocketFrame
-
-
Method Details
-
getDelegate
public io.vertx.core.http.WebSocketFrame getDelegate()- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
binaryFrame
- Parameters:
data- the data for the frameisFinal- true if it's the final frame in the WebSocket message- Returns:
- the frame
-
textFrame
- Parameters:
str- the string for the frameisFinal- true if it's the final frame in the WebSocket message- Returns:
- the frame
-
pingFrame
- Parameters:
data- the bytes for the frame, may be at most 125 bytes- Returns:
- the frame
-
pongFrame
- Parameters:
data- the bytes for the frame, may be at most 125 bytes- Returns:
- the frame
-
continuationFrame
- Parameters:
data- the data for the frameisFinal- true if it's the final frame in the WebSocket message- Returns:
- the frame
-
type
public io.vertx.core.http.WebSocketFrameType type()- Returns:
- the frame type
-
isText
public boolean isText()- Returns:
- whether the frame is a frame
-
isBinary
public boolean isBinary()- Returns:
- whether the frame is a frame
-
isContinuation
public boolean isContinuation()- Returns:
- whether the frame is a frame
-
isClose
public boolean isClose()- Returns:
- whether the frame is a frame
-
isPing
public boolean isPing()- Returns:
- whether the frame is a frame
-
textData
- Returns:
- the content of this frame as a UTF-8 string and returns the converted string. Only use this for text frames.
-
binaryData
- Returns:
- the data of the frame
-
isFinal
public boolean isFinal()- Returns:
- true if this is the final frame.
-
closeStatusCode
public short closeStatusCode()- Returns:
- status code of close frame. Only use this for close frames
-
closeReason
- Returns:
- string explaining close reason. Only use this for close frames
-
newInstance
-