Enum Class SFSRoomRemoveMode

java.lang.Object
java.lang.Enum<SFSRoomRemoveMode>
com.smartfoxserver.entities.SFSRoomRemoveMode
All Implemented Interfaces:
Serializable, Comparable<SFSRoomRemoveMode>, Constable

public enum SFSRoomRemoveMode extends Enum<SFSRoomRemoveMode>
The Remove Mode tells the RoomManager how to auto-remove dynamically created Rooms. Four different modes are provided.
  • Enum Constant Details

    • 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 Details

    • values

      public static SFSRoomRemoveMode[] 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 SFSRoomRemoveMode 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
    • fromString

      public static SFSRoomRemoveMode fromString(String id)