com.smartfoxserver.v2.entities
Enum SFSRoomRemoveMode

java.lang.Object
  extended by java.lang.Enum<SFSRoomRemoveMode>
      extended by 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
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
NEVER_REMOVE
          The Room is never removed (use with caution)
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
 
Method Summary
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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DEFAULT

public static final SFSRoomRemoveMode DEFAULT
The default mode works in two different ways depending on the type of Room:


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 name
java.lang.NullPointerException - if the argument is null

fromString

public static SFSRoomRemoveMode fromString(java.lang.String id)