Class ControlFrame
- java.lang.Object
-
- org.eclipse.jetty.websocket.common.WebSocketFrame
-
- org.eclipse.jetty.websocket.common.frames.ControlFrame
-
- All Implemented Interfaces:
Frame
- Direct Known Subclasses:
CloseFrame,PingFrame,PongFrame
public abstract class ControlFrame extends WebSocketFrame
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.websocket.api.extensions.Frame
Frame.Type
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_CONTROL_PAYLOADMaximum size of Control frame, per RFC 6455-
Fields inherited from class org.eclipse.jetty.websocket.common.WebSocketFrame
data, finRsvOp, mask, masked
-
-
Constructor Summary
Constructors Constructor Description ControlFrame(byte opcode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassertValid()booleanequals(java.lang.Object obj)java.nio.ByteBuffergetPayload()Get the payload ByteBuffer.booleanisControlFrame()booleanisDataFrame()WebSocketFramesetPayload(java.nio.ByteBuffer buf)Set the data payload.-
Methods inherited from class org.eclipse.jetty.websocket.common.WebSocketFrame
copy, copyHeaders, copyHeaders, getMask, getOpCode, getPayloadAsUTF8, getPayloadLength, getType, hashCode, hasPayload, isFin, isLast, isMasked, isRsv1, isRsv2, isRsv3, reset, setFin, setMask, setMasked, setOpCode, setRsv1, setRsv2, setRsv3, toString
-
-
-
-
Field Detail
-
MAX_CONTROL_PAYLOAD
public static final int MAX_CONTROL_PAYLOAD
Maximum size of Control frame, per RFC 6455- See Also:
- Constant Field Values
-
-
Method Detail
-
assertValid
public void assertValid()
- Specified by:
assertValidin classWebSocketFrame
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classWebSocketFrame
-
isControlFrame
public boolean isControlFrame()
- Specified by:
isControlFramein classWebSocketFrame
-
isDataFrame
public boolean isDataFrame()
- Specified by:
isDataFramein classWebSocketFrame
-
setPayload
public WebSocketFrame setPayload(java.nio.ByteBuffer buf)
Description copied from class:WebSocketFrameSet the data payload.The provided buffer will be used as is, no copying of bytes performed.
The provided buffer should be flipped and ready to READ from.
- Overrides:
setPayloadin classWebSocketFrame- Parameters:
buf- the bytebuffer to set- Returns:
- the frame itself
-
getPayload
public java.nio.ByteBuffer getPayload()
Description copied from class:WebSocketFrameGet the payload ByteBuffer. possible null.- Specified by:
getPayloadin interfaceFrame- Overrides:
getPayloadin classWebSocketFrame
-
-