public interface Frame
Frame
interface represents a frame as defined in
RFC 6455. A frame is a very lightweight envelope used to send
control information and either text or binary user data. Typically
a frame will represent a single message however, it is possible
to fragment a single frame up in to several frames. A fragmented
frame has a specific FrameType
indicating that it
is a continuation frame.DataFrame
Modifier and Type | Method and Description |
---|---|
byte[] |
getBinary()
This returns the binary payload that is to be sent with the frame.
|
Frame |
getFrame(FrameType type)
This method is used to convert from one frame type to another.
|
String |
getText()
This returns the text payload that is to be sent with the frame.
|
FrameType |
getType()
This is used to determine the type of frame.
|
boolean |
isFinal()
This is used to determine if the frame is the final frame in
a sequence of fragments or a whole frame.
|
boolean isFinal()
byte[] getBinary()
String getText()
Frame getFrame(FrameType type)
type
- this is the frame type to convert toFrameType getType()
Copyright © 2019. All rights reserved.