com.threerings.micasa.lobby
Class LobbyConfig

java.lang.Object
  extended by com.threerings.io.SimpleStreamableObject
      extended by com.threerings.crowd.data.PlaceConfig
          extended by com.threerings.micasa.lobby.LobbyConfig
All Implemented Interfaces:
Streamable
Direct Known Subclasses:
TableLobbyConfig

public class LobbyConfig
extends PlaceConfig


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
Streamable.Closure
 
Field Summary
protected  String _gameConfigClass
          The name of the game config class that represents the type of game we are matchmaking for in this lobby.
 
Constructor Summary
LobbyConfig()
           
 
Method Summary
 PlaceController createController()
           
 JComponent createMatchMakingView(MiCasaContext ctx)
          Derived classes override this function and create the appropriate matchmaking user interface component.
protected  String getConfigValue(Properties config, String key)
          Looks up a configuration property in the supplied properties object and throws an exception if it's not found.
 GameConfig getGameConfig()
          Instantiates and returns a game config instance using the game config classname provided by the lobby configuration parameters.
 String getManagerClassName()
           
 void init(Properties config)
          Initializes this lobby config object with the properties that are used to configure the lobby.
protected  void toString(StringBuilder buf)
           
 
Methods inherited from class com.threerings.crowd.data.PlaceConfig
getControllerClass
 
Methods inherited from class com.threerings.io.SimpleStreamableObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_gameConfigClass

protected String _gameConfigClass
The name of the game config class that represents the type of game we are matchmaking for in this lobby.

Constructor Detail

LobbyConfig

public LobbyConfig()
Method Detail

createController

public PlaceController createController()
Overrides:
createController in class PlaceConfig

getManagerClassName

public String getManagerClassName()
Specified by:
getManagerClassName in class PlaceConfig

createMatchMakingView

public JComponent createMatchMakingView(MiCasaContext ctx)
Derived classes override this function and create the appropriate matchmaking user interface component.


getGameConfig

public GameConfig getGameConfig()
                         throws Exception
Instantiates and returns a game config instance using the game config classname provided by the lobby configuration parameters.

Throws:
Exception - thrown if a problem occurs loading or instantiating the class.

init

public void init(Properties config)
          throws Exception
Initializes this lobby config object with the properties that are used to configure the lobby. This is called on the server when the lobby is loaded.

Throws:
Exception

toString

protected void toString(StringBuilder buf)
Overrides:
toString in class PlaceConfig

getConfigValue

protected String getConfigValue(Properties config,
                                String key)
                         throws Exception
Looks up a configuration property in the supplied properties object and throws an exception if it's not found.

Throws:
Exception