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.SerializableDefine 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.StringgetClassName()Get the fully qualified name of the Extension main classjava.lang.StringgetId()Get the extension idjava.lang.StringgetPropertiesFile()Get the name of the custom config properties filevoidsetPropertiesFile(java.lang.String propertiesFile)Set an optional properties file that will be loaded when the Extension is initialized.java.lang.StringtoString()
-
-
-
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 (extendingBaseSFSExtensionorSFSExtension)
-
-
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:
toStringin classjava.lang.Object
-
-