edu.umk.mat.merdacz.JGServer.config
Class ServerCfg
java.lang.Object
edu.umk.mat.merdacz.JGServer.config.ServerCfg
- public class ServerCfg
- extends java.lang.Object
Main class used to keep server configuration.
It is filled with data from xml configuration file.
After filling this cfg by CfgLoader we are only reading
hence no synchronization here
- Author:
- Marcin Daczkowski
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
plugins
private java.util.HashMap plugins
privateKey
private KeyCfg privateKey
publicKey
private KeyCfg publicKey
version
private java.lang.String version
port
private int port
debug
private boolean debug
dbAddress
private java.lang.String dbAddress
dbUser
private java.lang.String dbUser
dbPass
private java.lang.String dbPass
ServerCfg
public ServerCfg()
getDebug
public boolean getDebug()
- Returns:
- Debug mode
setDebug
public void setDebug(boolean debug)
- Parameters:
debug
- Debug mode
getPort
public int getPort()
- Returns:
- The port on which the server should listen
setPort
public void setPort(int port)
- Parameters:
port
- The port on which the server should listen
getVersion
public java.lang.String getVersion()
- Returns:
- The version of server
setVersion
public void setVersion(java.lang.String version)
- Parameters:
version
- The version of server
getPluginNamesList
public java.util.ArrayList getPluginNamesList()
- Usefull if client asks server for all supported games.
- Returns:
- The list of keys from internal plugins HashTable
addPlugin
public void addPlugin(PluginCfg plugin)
getPlugin
public PluginCfg getPlugin(java.lang.String pluginName)
getPrivateKey
public KeyCfg getPrivateKey()
- Returns:
- Server private key for ssl connection
setPrivateKey
public void setPrivateKey(KeyCfg privateKey)
- Parameters:
privateKey
- Server private key for ssl connection
getPublicKey
public KeyCfg getPublicKey()
- Returns:
- Server public key for ssl connection
setPublicKey
public void setPublicKey(KeyCfg publicKey)
- Parameters:
publicKey
- Server public key for ssl connection
getDbAddress
public java.lang.String getDbAddress()
- Returns:
setDbAddress
public void setDbAddress(java.lang.String dbAddress)
- Parameters:
dbAddress
-
getDbPass
public java.lang.String getDbPass()
- Returns:
setDbPass
public void setDbPass(java.lang.String dbPass)
- Parameters:
dbPass
-
getDbUser
public java.lang.String getDbUser()
- Returns:
setDbUser
public void setDbUser(java.lang.String dbUser)
- Parameters:
dbUser
-
toString
public java.lang.String toString()
- Produces report about configuration with witch server
is actually running.