Package com.smartfoxserver.entities
Enum Class SFSRoomRemoveMode
- All Implemented Interfaces:
Serializable,Comparable<SFSRoomRemoveMode>,Constable
The Remove Mode tells the RoomManager how to auto-remove dynamically created Rooms.
Four different modes are provided.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe default mode works in two different ways depending on the type of Room: Regular: the room is removed when the Room is empty and its creator is not connected anymore Game: the room is removed when the Room is emptyThe Room is never removed (use with caution)The Room is auto-removed when the last user leaves itThe Room is auto-removed when the Room is empty and its creator is not connected anymore -
Method Summary
Modifier and TypeMethodDescriptionstatic SFSRoomRemoveModefromString(String id) static SFSRoomRemoveModeReturns the enum constant of this class with the specified name.static SFSRoomRemoveMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
The default mode works in two different ways depending on the type of Room:- Regular: the room is removed when the Room is empty and its creator is not connected anymore
- Game: the room is removed when the Room is empty
-
WHEN_EMPTY
The Room is auto-removed when the last user leaves it -
WHEN_EMPTY_AND_CREATOR_IS_GONE
The Room is auto-removed when the Room is empty and its creator is not connected anymore -
NEVER_REMOVE
The Room is never removed (use with caution)
-
-
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
-
fromString
-