public enum PacketHandlerMode extends Enum<PacketHandlerMode>
| Enum Constant and Description |
|---|
QUEUE
把packet丢到一个队列中,让线程池去处理
|
SINGLE_THREAD
处理消息与解码在同一个线程中处理
|
| Modifier and Type | Method and Description |
|---|---|
static PacketHandlerMode |
forNumber(int value) |
int |
getValue() |
static PacketHandlerMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PacketHandlerMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PacketHandlerMode SINGLE_THREAD
public static final PacketHandlerMode QUEUE
public static PacketHandlerMode[] values()
for (PacketHandlerMode c : PacketHandlerMode.values()) System.out.println(c);
public static PacketHandlerMode 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 PacketHandlerMode forNumber(int value)
public int getValue()
Copyright © 2021. All rights reserved.