Last Site Update: 18 January 2010

GWAP API

Class

   java.lang.Object
     extended byHumanComputation.GWAP.Server
   public abstract class Server
   extends java.lang.Object

This class represents the GWAP server.

Constructor

  • Server

    public Server() Creates an empty GWAP server.

  • Server

    public Server(Database db, Log l, Score sc) Creates a GWAP server which contains the database interface, log system and score system.

      Parameter -
      db - the database system
      l - the log system
      sc - the score system
      See also -
      Database, Log, Score

Method

protected abstract
void
createGame ( )
Create the game.
protected
Database
getDatabase ( )
Get the database interface.
protected
Log
getLog ( )
Get the log system.
protected
Score
getScore ( )
Get the score system.
protected
void
setDatabase ( )
Set the database interface.
protected
void
setLog ( )
Set the log system.
protected
void
setScore ( )
Set the score system.
abstract
void
start ( )
Start the GWAP server.
voidstop ( )
Stop the GWAP server.

 

Method Detail

  • createGame

    protected abstract void createGame()

    Create the game. (This method must be overridden.)

     

  • getDatabase

    protected final getDatabase()

    Get the database interface. (This method cannot be overridden.)

      Return -
      the database interface of this GWAP server

     

  • getLog

    protected final LoggetLog()

    Get the log system. (This method cannot be overridden.)

      Return -
      the log system of this GWAP server

     

  • getScore

    protected final ScoregetScore()

    Get the score system. (This method cannot be overridden.)

      Return -
      the score system of this GWAP server

     

  • setDatabase

    protected final void setDatabase(Database db)

    Set the database interface. (This method cannot be overridden.)

      Parameter -
      db - the database interface

     

  • setLog

    protected final void setLog(Log l)

    Set the log system. (This method cannot be overridden.)

      Parameter -
      l - the log system

     

  • setScore

    protected final void setScore(Score sc)

    Set the score system. (This method cannot be overridden.)

      Parameter -
      sc - the score system of this GWAP server

     

  • start

    public abstract void start()

    Starts this game. (This method must be overridden.)

     

  • stop

    public void stop()

    Stop the GWAP server.