ggz.client.core
Class Module

java.lang.Object
  extended by ggz.client.core.Module

public class Module
extends java.lang.Object


Constructor Summary
Module(java.lang.String name, java.lang.String protocolEngine, java.lang.String protocolVersion, java.lang.String className, java.lang.String iconPath)
           
 
Method Summary
 java.lang.String getClassName()
           
 java.lang.String getCommandLine()
           
static Module getForGame(GameType type)
          Gets the module that provides support for the game.
static Module getForGame(java.lang.String game, java.lang.String engine, java.lang.String version)
           
 java.lang.String getIconResourcePath()
          Gets the patch to the icon as is needed by Class.getResource().
 java.lang.String getName()
           
static int getNumModules()
          This returns the number of registered modules
 java.lang.String getProtocolEngine()
           
 java.lang.String getProtocolVersion()
           
 java.lang.String getPWD()
           
 boolean isEmbedded()
          Always returns true.
static boolean isGameSupported(GameType game)
          Checks if there is a module registered for the game type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Module

public Module(java.lang.String name,
              java.lang.String protocolEngine,
              java.lang.String protocolVersion,
              java.lang.String className,
              java.lang.String iconPath)
Method Detail

getNumModules

public static int getNumModules()
This returns the number of registered modules


isGameSupported

public static boolean isGameSupported(GameType game)
Checks if there is a module registered for the game type.


getForGame

public static Module getForGame(GameType type)
Gets the module that provides support for the game. The protocol and version must be an exact match for the game type but only the start of the module name must match the game name. This allows us to define different types of rooms for the various games.

Returns:
the module that supports this game and protocol

getForGame

public static Module getForGame(java.lang.String game,
                                java.lang.String engine,
                                java.lang.String version)

getName

public java.lang.String getName()

getProtocolEngine

public java.lang.String getProtocolEngine()

getProtocolVersion

public java.lang.String getProtocolVersion()

getIconResourcePath

public java.lang.String getIconResourcePath()
Gets the patch to the icon as is needed by Class.getResource().

Returns:
the path to the icon.

getClassName

public java.lang.String getClassName()

getPWD

public java.lang.String getPWD()

getCommandLine

public java.lang.String getCommandLine()

isEmbedded

public boolean isEmbedded()
Always returns true. We don't currently support non-embedded game clients although suppport is mostly already implemented in the Mod.