Enum Class ServerEvent
- All Implemented Interfaces:
Serializable
,Comparable<ServerEvent>
,Constable
All supported events could be emitted on the server.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionWhen the server validates a UDP channel accessing request from a player.When the server responds a UDP channel accessing request from a player.When the server responds a connection request from client side.When a message sent to the sever from client side via datagram channel at the first time, this event is triggered.When a player is going to disconnect from the server.When the server provides information regarding bandwidth.When the server provides information regarding CCU.When a player has just left its room.When a player is going to leave its current room.When the server responds a request from player regarding joining a room.When the server responds a player logged in request.When the server handles a reconnection request.When the server responds a player reconnected request.When the server receives a message from client side on behalf of its player.When the server responds a room creation request.When a room is going to be removed from the management list.When the server sends a message to client side on behalf of its player.When there is any exception occurs on the server.When the server finished initialization and is ready.When the server is going to shut down.When there is any issue occurs to a session.When a message from client side sent to a session.When a new session requests to connect to the server.When a session is going to disconnect to the server.When a message sent to a session.When an incoming connection is refused to establish a session on the server.When a player attempts to change its role from 'participant' to 'spectator'.When a player attempts to change its role from 'spectator' to 'participant'.When the server provides information regarding system.When an incoming connection is refused to establish a session on the server. -
Method Summary
Modifier and TypeMethodDescriptiontoString()
static ServerEvent
Returns the enum constant of this class with the specified name.static ServerEvent[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SOCKET_CONNECTION_REFUSED
When an incoming connection is refused to establish a session on the server.- Since:
- 0.3.1
- See Also:
-
WEBSOCKET_CONNECTION_REFUSED
When an incoming connection is refused to establish a session on the server.- Since:
- 0.3.1
- See Also:
-
SESSION_REQUEST_CONNECTION
When a new session requests to connect to the server. -
SESSION_OCCURRED_EXCEPTION
When there is any issue occurs to a session. -
SESSION_WILL_BE_CLOSED
When a session is going to disconnect to the server. -
SESSION_READ_MESSAGE
When a message from client side sent to a session. -
SESSION_WRITE_MESSAGE
When a message sent to a session.- See Also:
-
DATAGRAM_CHANNEL_READ_MESSAGE_FIRST_TIME
When a message sent to the sever from client side via datagram channel at the first time, this event is triggered. The system will check if the client's datagram channel was already registered or not to decide which event should be emitted. The implementation can be found inAbstractZeroEngine.getDatagramIoHandler()
, and it haschannelRead
orsessionRead
for separated purposes.- See Also:
-
SERVER_INITIALIZATION
When the server finished initialization and is ready.- See Also:
-
CONNECTION_ESTABLISHED_RESULT
When the server responds a connection request from client side.- See Also:
-
PLAYER_LOGGEDIN_RESULT
When the server responds a player logged in request.- See Also:
-
PLAYER_RECONNECT_REQUEST_HANDLE
When the server handles a reconnection request.- See Also:
-
PLAYER_RECONNECTED_RESULT
When the server responds a player reconnected request.- See Also:
-
SEND_MESSAGE_TO_PLAYER
When the server sends a message to client side on behalf of its player.- See Also:
-
RECEIVED_MESSAGE_FROM_PLAYER
When the server receives a message from client side on behalf of its player.- See Also:
-
ROOM_CREATED_RESULT
When the server responds a room creation request.- See Also:
-
ROOM_WILL_BE_REMOVED
When a room is going to be removed from the management list.- See Also:
-
PLAYER_JOINED_ROOM_RESULT
When the server responds a request from player regarding joining a room.- See Also:
-
PLAYER_BEFORE_LEAVE_ROOM
When a player is going to leave its current room.- See Also:
-
PLAYER_AFTER_LEFT_ROOM
When a player has just left its room.- See Also:
-
SWITCH_PARTICIPANT_TO_SPECTATOR
When a player attempts to change its role from 'participant' to 'spectator'.- See Also:
-
SWITCH_SPECTATOR_TO_PARTICIPANT
When a player attempts to change its role from 'spectator' to 'participant'.- See Also:
-
DISCONNECT_PLAYER
When a player is going to disconnect from the server.- See Also:
-
ACCESS_DATAGRAM_CHANNEL_REQUEST_VALIDATION
When the server validates a UDP channel accessing request from a player. -
ACCESS_DATAGRAM_CHANNEL_REQUEST_VALIDATION_RESULT
When the server responds a UDP channel accessing request from a player. -
FETCHED_CCU_INFO
When the server provides information regarding CCU.- See Also:
-
FETCHED_BANDWIDTH_INFO
When the server provides information regarding bandwidth.- See Also:
-
SYSTEM_MONITORING
When the server provides information regarding system.- See Also:
-
SERVER_EXCEPTION
When there is any exception occurs on the server.- See Also:
-
SERVER_TEARDOWN
When the server is going to shut down.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
- Overrides:
toString
in classEnum<ServerEvent>
-