public enum Opcode extends Enum<Opcode>
enum
that represents types of the Web Socket frames.Enum Constant and Description |
---|
BINARY
Denotes a binary frame
|
CLOSE
Denotes a connection close frame
|
CONTINUATION
Denotes a continuation frame
|
PING
Denotes a ping frame
|
PONG
Denotes a pong frame
|
TEXT
Denotes a text frame
|
Modifier and Type | Method and Description |
---|---|
static Opcode |
findByValue(int value)
Finds an Opcode by its numeric value.
|
boolean |
isControl()
Tells if this Opcode is for a control frame.
|
int |
value()
Returns numeric value of this Opcode.
|
static Opcode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Opcode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Opcode CONTINUATION
public static final Opcode TEXT
public static final Opcode BINARY
public static final Opcode CLOSE
public static final Opcode PING
public static final Opcode PONG
public static Opcode[] values()
for (Opcode c : Opcode.values()) System.out.println(c);
public static Opcode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static Opcode findByValue(int value)
value
- the numeric value of the Opcode to findOpcode
or null
if no Opcode is defined for given
valueArrayIndexOutOfBoundsException
- if the value
is too big or negativepublic int value()
public boolean isControl()
true
if the Opcode is for a control frameCopyright © 2017–2022 SNF4J.ORG. All rights reserved.