More information


de.spieleck.pcs.conf
Class ConfigAdmin

java.lang.Object
  |
  +--de.spieleck.pcs.conf.ConfigAdmin

public class ConfigAdmin
extends java.lang.Object

This class manages ConfigUsers and acts as a Observer to ConfigUsers. It is implemented as a Singleton.
By calling resetConfig on every registered ConfigUser resetConfig is called.


Constructor Summary
protected ConfigAdmin()
          Creates a new instance of ConfigAdmin
 
Method Summary
 void addConfigUser(ConfigUser user)
          registers a ConfigUser to the ConfigAdmin
 java.lang.String[] getConfigUserNames()
           
static ConfigAdmin getInstance()
          returns an instance of ConfigAdmin, used for implementing the Singleton pattern
 void removeConfigUser(ConfigUser user)
          unregisters a ConfigUser from the ConfigAdmin
 int resetConfig()
          resets the configuration of all registered ConfigUsers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigAdmin

protected ConfigAdmin()
Creates a new instance of ConfigAdmin
Method Detail

getInstance

public static ConfigAdmin getInstance()
returns an instance of ConfigAdmin, used for implementing the Singleton pattern
Returns:
an instance of ConfigAdmin

addConfigUser

public void addConfigUser(ConfigUser user)
registers a ConfigUser to the ConfigAdmin
Parameters:
user - the ConfigUser to register

removeConfigUser

public void removeConfigUser(ConfigUser user)
unregisters a ConfigUser from the ConfigAdmin
Parameters:
user - the ConfigUser to unregister

resetConfig

public int resetConfig()
resets the configuration of all registered ConfigUsers

getConfigUserNames

public java.lang.String[] getConfigUserNames()

More information