Class DataFrame
- java.lang.Object
-
- org.eclipse.jetty.websocket.common.WebSocketFrame
-
- org.eclipse.jetty.websocket.common.frames.DataFrame
-
- All Implemented Interfaces:
Frame
- Direct Known Subclasses:
BinaryFrame
,ContinuationFrame
,TextFrame
public class DataFrame extends WebSocketFrame
A Data Frame
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.websocket.api.extensions.Frame
Frame.Type
-
-
Field Summary
-
Fields inherited from class org.eclipse.jetty.websocket.common.WebSocketFrame
data, finRsvOp, mask, masked
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DataFrame(byte opcode)
DataFrame(Frame basedOn)
Construct new DataFrame based on headers of provided frame.DataFrame(Frame basedOn, boolean continuation)
Construct new DataFrame based on headers of provided frame, overriding for continuations if needed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assertValid()
boolean
isControlFrame()
boolean
isDataFrame()
void
setIsContinuation()
Set the data frame to continuation mode-
Methods inherited from class org.eclipse.jetty.websocket.common.WebSocketFrame
copy, copyHeaders, copyHeaders, equals, getMask, getOpCode, getPayload, getPayloadAsUTF8, getPayloadLength, getType, hashCode, hasPayload, isFin, isLast, isMasked, isRsv1, isRsv2, isRsv3, reset, setFin, setMask, setMasked, setOpCode, setPayload, setRsv1, setRsv2, setRsv3, toString
-
-
-
-
Constructor Detail
-
DataFrame
protected DataFrame(byte opcode)
-
DataFrame
public DataFrame(Frame basedOn)
Construct new DataFrame based on headers of provided frame.Useful for when working in extensions and a new frame needs to be created.
- Parameters:
basedOn
- the frame this one is based on
-
DataFrame
public DataFrame(Frame basedOn, boolean continuation)
Construct new DataFrame based on headers of provided frame, overriding for continuations if needed.Useful for when working in extensions and a new frame needs to be created.
- Parameters:
basedOn
- the frame this one is based oncontinuation
- true if this is a continuation frame
-
-
Method Detail
-
assertValid
public void assertValid()
- Specified by:
assertValid
in classWebSocketFrame
-
isControlFrame
public boolean isControlFrame()
- Specified by:
isControlFrame
in classWebSocketFrame
-
isDataFrame
public boolean isDataFrame()
- Specified by:
isDataFrame
in classWebSocketFrame
-
setIsContinuation
public void setIsContinuation()
Set the data frame to continuation mode
-
-