Package com.tenio.configuration.constant
Enum LEvent
- java.lang.Object
-
- java.lang.Enum<LEvent>
-
- com.tenio.configuration.constant.LEvent
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CHANNEL_HANDLE
You can handle the message sent from a connection here.CONNECTION_CLOSE
When a client is disconnected from your server for any reason, you can handle it in this event.CONNECTION_EXCEPTION
The exceptions occur when the server handles messages from a client.FORCE_PLAYER_LEAVE_ROOM
When a player is forced to leave his current room.MANUALY_CLOSE_CONNECTION
This event is called when you let the player leave by his desire.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LEvent
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static LEvent[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CONNECTION_CLOSE
public static final LEvent CONNECTION_CLOSE
When a client is disconnected from your server for any reason, you can handle it in this event.
- parameter[0] the connection, see
Connection
- parameter[0] the connection, see
-
CONNECTION_EXCEPTION
public static final LEvent CONNECTION_EXCEPTION
The exceptions occur when the server handles messages from a client.
- parameter[0] the connection's id in string
- parameter[1] the connection, see
Connection
- parameter[2] the exception will occur, see
Throwable
-
MANUALY_CLOSE_CONNECTION
public static final LEvent MANUALY_CLOSE_CONNECTION
This event is called when you let the player leave by his desire.
- parameter[0] the player's name, see
AbstractPlayer.getName()
- parameter[0] the player's name, see
-
FORCE_PLAYER_LEAVE_ROOM
public static final LEvent FORCE_PLAYER_LEAVE_ROOM
When a player is forced to leave his current room. It means this player was kicked by the host or the entire room was removed.
- parameter[0] a player who was forced to leave, see
AbstractPlayer
- parameter[0] a player who was forced to leave, see
-
CHANNEL_HANDLE
public static final LEvent CHANNEL_HANDLE
You can handle the message sent from a connection here.- parameter[0] index: the connection's order in one player (start from 0)
- parameter[1] the connection (can be null) that is retrieved
from the corresponding channel, see
Connection
- parameter[2] the message, see
TObject
which is sent by its corresponding connection - parameter[3] the connection object which is used to assigned to a
player (can be null, see
Connection
-
-
Method Detail
-
values
public static LEvent[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LEvent c : LEvent.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LEvent 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
-
-