nl.tudelft.goal.ut2004.visualizer.controller
Class ServerController

Package class diagram package ServerController
java.lang.Object
  extended by nl.tudelft.goal.ut2004.visualizer.controller.ServerController

public class ServerController
extends Object

s all the gathering of data for the basic functionality of the visualizer. It stores for instance information on each player in GameData. It is also the access for the application to get access to subscribe to AbstractData and retrieve the UTServer if that is necessary.

Author:
Lennard de Rijk, M.P. Korstanje

Method Summary
static void createNewController()
          Creates an new ServerController, disposes the old one iff exists.
static void disposeController()
          Disposes the current ServerController if it exists.
 EnvironmentData getEnvironmentData()
           
 GameData getGameData()
           
 GameStatusData getGameStatus()
           
static ServerController getInstance()
           
 IUT2004Server getServer()
          Returns the IUT2004Server managed by this controller WorldServerDefinition.
 nl.tudelft.pogamut.base.server.ServerDefinition<IUT2004Server> getServerDefinition()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getGameData

public GameData getGameData()
Returns:
The collection of data we have on all the players

getGameStatus

public GameStatusData getGameStatus()
Returns:
the GameStatusData instance that keeps track of the GameStatus

getServerDefinition

public nl.tudelft.pogamut.base.server.ServerDefinition<IUT2004Server> getServerDefinition()
Returns:
the WorldServerDefinition this controllers holds.

getServer

public IUT2004Server getServer()
Returns the IUT2004Server managed by this controller WorldServerDefinition. Or null if no server is running.

Returns:
null or the server.

getEnvironmentData

public EnvironmentData getEnvironmentData()

createNewController

public static void createNewController()
Creates an new ServerController, disposes the old one iff exists.

Parameters:
server - The UTServer used by the ServerController

disposeController

public static void disposeController()
Disposes the current ServerController if it exists.


getInstance

public static ServerController getInstance()
Returns:
the singleton instance of the ServerController


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.