Package com.smartfoxserver.v2.api
Class CreateRoomSettings.RoomExtensionSettings
- java.lang.Object
-
- com.smartfoxserver.v2.api.CreateRoomSettings.RoomExtensionSettings
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- CreateRoomSettings
public static final class CreateRoomSettings.RoomExtensionSettings extends java.lang.Object implements java.io.Serializable
Define the Extension settings of the RoomEach extension can define 3 parameters
- id: the id of the extension (corresponding to the extension folder name)
- className: the main extension class file
- propertiesFile: (optional) a properties file containing custom configuration data for your extension.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RoomExtensionSettings(java.lang.String id, java.lang.String className)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getClassName()
Get the fully qualified name of the Extension main classjava.lang.String
getId()
Get the extension idjava.lang.String
getPropertiesFile()
Get the name of the custom config properties filevoid
setPropertiesFile(java.lang.String propertiesFile)
Set an optional properties file that will be loaded when the Extension is initialized.java.lang.String
toString()
-
-
-
Constructor Detail
-
RoomExtensionSettings
public RoomExtensionSettings(java.lang.String id, java.lang.String className)
- Parameters:
id
- the id must correspond to the Extension's folder name under the extensions/ directoryclassName
- the fully qualified name of the Extension main class (extendingBaseSFSExtension
orSFSExtension
)
-
-
Method Detail
-
getId
public java.lang.String getId()
Get the extension id- Returns:
- the extension id
-
getClassName
public java.lang.String getClassName()
Get the fully qualified name of the Extension main class- Returns:
- the fully qualified name of the Extension main class
-
setPropertiesFile
public void setPropertiesFile(java.lang.String propertiesFile)
Set an optional properties file that will be loaded when the Extension is initialized. By default the Server already looks for a config.properties in the extension folder. If the file exists it is auto-loaded.The properties are immediately available in your extension via the BaseSFSExtension.getConfigProperties() protected method.
- Parameters:
propertiesFile
- the name of the custom config properties file.
-
getPropertiesFile
public java.lang.String getPropertiesFile()
Get the name of the custom config properties file- Returns:
- the name of the custom config properties file
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-