Package org.eclipse.jetty.websocket.core
Class OpCode
java.lang.Object
org.eclipse.jetty.websocket.core.OpCode
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byteOpCode for a Binary Framestatic final byteOpCode for a Close Framestatic final byteOpCode for a Continuation Framestatic final byteOpCode for a Ping Framestatic final byteOpCode for a Pong Framestatic final byteOpCode for a Text Framestatic final byteAn undefined OpCode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic bytegetOpCode(byte firstByte) static booleanisControlFrame(byte opcode) static booleanisDataFrame(byte opcode) static booleanisKnown(byte opcode) Test for known opcodes (per the RFC spec)static Stringname(byte opcode)
-
Field Details
-
CONTINUATION
public static final byte CONTINUATIONOpCode for a Continuation Frame -
TEXT
public static final byte TEXTOpCode for a Text Frame -
BINARY
public static final byte BINARYOpCode for a Binary Frame -
CLOSE
public static final byte CLOSEOpCode for a Close Frame -
PING
public static final byte PINGOpCode for a Ping Frame -
PONG
public static final byte PONGOpCode for a Pong Frame -
UNDEFINED
public static final byte UNDEFINEDAn undefined OpCode- See Also:
-
-
Constructor Details
-
OpCode
public OpCode()
-
-
Method Details
-
getOpCode
public static byte getOpCode(byte firstByte) -
isControlFrame
public static boolean isControlFrame(byte opcode) -
isDataFrame
public static boolean isDataFrame(byte opcode) -
isKnown
public static boolean isKnown(byte opcode) Test for known opcodes (per the RFC spec)- Parameters:
opcode- the opcode to test- Returns:
- true if known. false if unknown, undefined, or reserved
-
name
-