Package yapion.packet
Enum YAPIONPacketReceiver.Handler
- java.lang.Object
-
- java.lang.Enum<YAPIONPacketReceiver.Handler>
-
- yapion.packet.YAPIONPacketReceiver.Handler
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<YAPIONPacketReceiver.Handler>
,java.lang.constant.Constable
- Enclosing class:
- YAPIONPacketReceiver
public static enum YAPIONPacketReceiver.Handler extends java.lang.Enum<YAPIONPacketReceiver.Handler>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DESERIALIZE_EXCEPTION
Used when deserialization to an YAPIONPacket failed with an exception.DROP
Used when some data was dropped.ERROR
EXCEPTION
Used when any user handlers threw an exception.HANDLE_FAILED
Used when anything while checking the incoming data failed.HEART_BEAT
Used when an heartbeat packet arrived.LOST_HEART_BEAT
Used when the heartbeat packet was not received in the given amount of time.UNKNOWN_PACKET
Used when a packet has an unknownIdentifierUtils.TYPE_IDENTIFIER
.USER
-
Method Summary
Modifier and Type Method Description static YAPIONPacketReceiver.Handler
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static YAPIONPacketReceiver.Handler[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ERROR
public static final YAPIONPacketReceiver.Handler ERROR
-
EXCEPTION
public static final YAPIONPacketReceiver.Handler EXCEPTION
Used when any user handlers threw an exception.
-
UNKNOWN_PACKET
public static final YAPIONPacketReceiver.Handler UNKNOWN_PACKET
Used when a packet has an unknownIdentifierUtils.TYPE_IDENTIFIER
.
-
DROP
public static final YAPIONPacketReceiver.Handler DROP
Used when some data was dropped.
-
DESERIALIZE_EXCEPTION
public static final YAPIONPacketReceiver.Handler DESERIALIZE_EXCEPTION
Used when deserialization to an YAPIONPacket failed with an exception.
-
HANDLE_FAILED
public static final YAPIONPacketReceiver.Handler HANDLE_FAILED
Used when anything while checking the incoming data failed.
-
HEART_BEAT
public static final YAPIONPacketReceiver.Handler HEART_BEAT
Used when an heartbeat packet arrived.
-
LOST_HEART_BEAT
public static final YAPIONPacketReceiver.Handler LOST_HEART_BEAT
Used when the heartbeat packet was not received in the given amount of time.
-
USER
public static final YAPIONPacketReceiver.Handler USER
-
-
Method Detail
-
values
public static YAPIONPacketReceiver.Handler[] values()
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static YAPIONPacketReceiver.Handler valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-