Enum Class ServerEvent

java.lang.Object
java.lang.Enum<ServerEvent>
com.tenio.core.configuration.define.ServerEvent
All Implemented Interfaces:
Serializable, Comparable<ServerEvent>, Constable

public enum ServerEvent extends Enum<ServerEvent>
All supported events could be emitted on the server.
  • Enum Constant Details

    • SOCKET_CONNECTION_REFUSED

      public static final ServerEvent 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

      public static final ServerEvent 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

      @Asynchronous public static final ServerEvent SESSION_REQUEST_CONNECTION
      When a new session requests to connect to the server.
    • SESSION_OCCURRED_EXCEPTION

      public static final ServerEvent SESSION_OCCURRED_EXCEPTION
      When there is any issue occurs to a session.
    • SESSION_WILL_BE_CLOSED

      public static final ServerEvent SESSION_WILL_BE_CLOSED
      When a session is going to disconnect to the server.
    • SESSION_READ_MESSAGE

      @Asynchronous public static final ServerEvent SESSION_READ_MESSAGE
      When a message from client side sent to a session.
    • SESSION_WRITE_MESSAGE

      @Asynchronous public static final ServerEvent SESSION_WRITE_MESSAGE
      When a message sent to a session.
      See Also:
    • DATAGRAM_CHANNEL_READ_MESSAGE_FIRST_TIME

      @Asynchronous public static final ServerEvent 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 in AbstractZeroEngine.getDatagramIoHandler(), and it has channelRead or sessionRead for separated purposes.
      See Also:
    • SERVER_INITIALIZATION

      public static final ServerEvent SERVER_INITIALIZATION
      When the server finished initialization and is ready.
      See Also:
    • CONNECTION_ESTABLISHED_RESULT

      public static final ServerEvent CONNECTION_ESTABLISHED_RESULT
      When the server responds a connection request from client side.
      See Also:
    • PLAYER_LOGGEDIN_RESULT

      public static final ServerEvent PLAYER_LOGGEDIN_RESULT
      When the server responds a player logged in request.
      See Also:
    • PLAYER_RECONNECT_REQUEST_HANDLE

      public static final ServerEvent PLAYER_RECONNECT_REQUEST_HANDLE
      When the server handles a reconnection request.
      See Also:
    • PLAYER_RECONNECTED_RESULT

      public static final ServerEvent PLAYER_RECONNECTED_RESULT
      When the server responds a player reconnected request.
      See Also:
    • SEND_MESSAGE_TO_PLAYER

      public static final ServerEvent SEND_MESSAGE_TO_PLAYER
      When the server sends a message to client side on behalf of its player.
      See Also:
    • RECEIVED_MESSAGE_FROM_PLAYER

      public static final ServerEvent RECEIVED_MESSAGE_FROM_PLAYER
      When the server receives a message from client side on behalf of its player.
      See Also:
    • ROOM_CREATED_RESULT

      public static final ServerEvent ROOM_CREATED_RESULT
      When the server responds a room creation request.
      See Also:
    • ROOM_WILL_BE_REMOVED

      public static final ServerEvent ROOM_WILL_BE_REMOVED
      When a room is going to be removed from the management list.
      See Also:
    • PLAYER_JOINED_ROOM_RESULT

      public static final ServerEvent PLAYER_JOINED_ROOM_RESULT
      When the server responds a request from player regarding joining a room.
      See Also:
    • PLAYER_BEFORE_LEAVE_ROOM

      public static final ServerEvent PLAYER_BEFORE_LEAVE_ROOM
      When a player is going to leave its current room.
      See Also:
    • PLAYER_AFTER_LEFT_ROOM

      public static final ServerEvent PLAYER_AFTER_LEFT_ROOM
      When a player has just left its room.
      See Also:
    • SWITCH_PARTICIPANT_TO_SPECTATOR

      public static final ServerEvent SWITCH_PARTICIPANT_TO_SPECTATOR
      When a player attempts to change its role from 'participant' to 'spectator'.
      See Also:
    • SWITCH_SPECTATOR_TO_PARTICIPANT

      public static final ServerEvent SWITCH_SPECTATOR_TO_PARTICIPANT
      When a player attempts to change its role from 'spectator' to 'participant'.
      See Also:
    • DISCONNECT_PLAYER

      public static final ServerEvent DISCONNECT_PLAYER
      When a player is going to disconnect from the server.
      See Also:
    • ACCESS_DATAGRAM_CHANNEL_REQUEST_VALIDATION

      public static final ServerEvent ACCESS_DATAGRAM_CHANNEL_REQUEST_VALIDATION
      When the server validates a UDP channel accessing request from a player.
      See Also:
    • ACCESS_DATAGRAM_CHANNEL_REQUEST_VALIDATION_RESULT

      public static final ServerEvent ACCESS_DATAGRAM_CHANNEL_REQUEST_VALIDATION_RESULT
      When the server responds a UDP channel accessing request from a player.
      See Also:
    • FETCHED_CCU_INFO

      public static final ServerEvent FETCHED_CCU_INFO
      When the server provides information regarding CCU.
      See Also:
    • FETCHED_BANDWIDTH_INFO

      public static final ServerEvent FETCHED_BANDWIDTH_INFO
      When the server provides information regarding bandwidth.
      See Also:
    • SYSTEM_MONITORING

      public static final ServerEvent SYSTEM_MONITORING
      When the server provides information regarding system.
      See Also:
    • SERVER_EXCEPTION

      public static final ServerEvent SERVER_EXCEPTION
      When there is any exception occurs on the server.
      See Also:
    • SERVER_TEARDOWN

      public static final ServerEvent SERVER_TEARDOWN
      When the server is going to shut down.
      See Also:
  • Method Details

    • values

      public static ServerEvent[] 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

      public static ServerEvent valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<ServerEvent>