All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class game.GameFactory

java.lang.Object
   |
   +----game.GameFactory

public class GameFactory
extends Object
GameFactory.java


Variable Index

 o classTable
Cache for loaded classes
 o debug
 o props
Properties loaded from file at creation.
 o sharedInstance
Shared instance of the Factory.

Constructor Index

 o GameFactory()
Creates a new GameFactory.

Method Index

 o createGame(String)
Creates a new instance of the specified game.
 o getGameClass(String)
Load a Game class according to the specified game name.
 o getGameInfos()
 o getSharedInstance()
Returns the shared instance of the factory.
 o loadClasses()
Load all game classes into the server, so they are ready to be used.

Variables

 o debug
 public boolean debug
 o classTable
 Hashtable classTable
Cache for loaded classes

 o props
 Properties props
Properties loaded from file at creation.

 o sharedInstance
 static GameFactory sharedInstance
Shared instance of the Factory.

Constructors

 o GameFactory
 protected GameFactory()
Creates a new GameFactory.

Methods

 o loadClasses
 public void loadClasses()
Load all game classes into the server, so they are ready to be used.

 o 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.
 o 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.
 o getSharedInstance
 public static synchronized GameFactory getSharedInstance()
Returns the shared instance of the factory.

 o getGameInfos
 public Enumeration getGameInfos()

All Packages  Class Hierarchy  This Package  Previous  Next  Index