All Packages Class Hierarchy This Package Previous Next Index
Class game.GameFactory
java.lang.Object
|
+----game.GameFactory
- public class GameFactory
- extends Object
GameFactory.java
-
classTable
- Cache for loaded classes
-
debug
-
-
props
- Properties loaded from file at creation.
-
sharedInstance
- Shared instance of the Factory.
-
GameFactory()
- Creates a new GameFactory.
-
createGame(String)
- Creates a new instance of the specified game.
-
getGameClass(String)
- Load a Game class according to the specified game name.
-
getGameInfos()
-
-
getSharedInstance()
- Returns the shared instance of the factory.
-
loadClasses()
- Load all game classes into the server, so they are ready
to be used.
debug
public boolean debug
classTable
Hashtable classTable
- Cache for loaded classes
props
Properties props
- Properties loaded from file at creation.
sharedInstance
static GameFactory sharedInstance
- Shared instance of the Factory.
GameFactory
protected GameFactory()
- Creates a new GameFactory.
loadClasses
public void loadClasses()
- Load all game classes into the server, so they are ready
to be used.
getGameClass
public Class getGameClass(String name)
- Load a Game class according to the specified game name.
The class corresponding to the name is determined by searching
in the properties.
- Parameters:
- name - the name of the game.
createGame
public Game createGame(String name)
- Creates a new instance of the specified game.
- Parameters:
- name - the name of the game.
- Returns:
- a new instance of the
Game
object
corresponding to the given name.
getSharedInstance
public static synchronized GameFactory getSharedInstance()
- Returns the shared instance of the factory.
getGameInfos
public Enumeration getGameInfos()
All Packages Class Hierarchy This Package Previous Next Index