Package com.smartfoxserver.v2.entities
Enum SFSRoomRemoveMode
- java.lang.Object
-
- java.lang.Enum<SFSRoomRemoveMode>
-
- com.smartfoxserver.v2.entities.SFSRoomRemoveMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SFSRoomRemoveMode>
public enum SFSRoomRemoveMode extends java.lang.Enum<SFSRoomRemoveMode>
The Remove Mode tells the RoomManager how to auto-remove dynamically created Rooms. Four different modes are provided.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description 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 emptyNEVER_REMOVE
The Room is never removed (use with caution)WHEN_EMPTY
The Room is auto-removed when the last user leaves itWHEN_EMPTY_AND_CREATOR_IS_GONE
The Room is auto-removed when the Room is empty and its creator is not connected anymore
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SFSRoomRemoveMode
fromString(java.lang.String id)
static SFSRoomRemoveMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SFSRoomRemoveMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final SFSRoomRemoveMode 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
public static final SFSRoomRemoveMode WHEN_EMPTY
The Room is auto-removed when the last user leaves it
-
WHEN_EMPTY_AND_CREATOR_IS_GONE
public static final SFSRoomRemoveMode 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
public static final SFSRoomRemoveMode NEVER_REMOVE
The Room is never removed (use with caution)
-
-
Method Detail
-
values
public static SFSRoomRemoveMode[] 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 (SFSRoomRemoveMode c : SFSRoomRemoveMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SFSRoomRemoveMode 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
-
fromString
public static SFSRoomRemoveMode fromString(java.lang.String id)
-
-