net.sf.freecol.metaserver
Class MetaItem

java.lang.Object
  extended by net.sf.freecol.common.ServerInfo
      extended by net.sf.freecol.metaserver.MetaItem

public class MetaItem
extends ServerInfo

This object stores information about a single running server.


Constructor Summary
MetaItem(java.lang.String name, java.lang.String address, int port, int slotsAvailable, int currentlyPlaying, boolean isGameStarted, java.lang.String version, int gameState)
          Creates a new object with the given information.
 
Method Summary
 long getLastUpdated()
          Returns the last time this object was updated.
 void update(java.lang.String name, java.lang.String address, int port, int slotsAvailable, int currentlyPlaying, boolean isGameStarted, java.lang.String version, int gameState)
          Updates this object with the given information.
 
Methods inherited from class net.sf.freecol.common.ServerInfo
getAddress, getCurrentlyPlaying, getGameState, getName, getPort, getSlotsAvailable, getVersion, getXMLElementTagName, readFromXMLElement, toString, toXMLElement
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetaItem

public MetaItem(java.lang.String name,
                java.lang.String address,
                int port,
                int slotsAvailable,
                int currentlyPlaying,
                boolean isGameStarted,
                java.lang.String version,
                int gameState)
Creates a new object with the given information.

Parameters:
name - The name of the server.
address - The IP-address of the server.
port - The port number in which clients may connect.
slotsAvailable - Number of players that may conncet.
currentlyPlaying - Number of players that are currently connected.
isGameStarted - true if the game has started.
version - The version the server is running.
gameState - The current state of the game.
Method Detail

update

public void update(java.lang.String name,
                   java.lang.String address,
                   int port,
                   int slotsAvailable,
                   int currentlyPlaying,
                   boolean isGameStarted,
                   java.lang.String version,
                   int gameState)
Updates this object with the given information.

Overrides:
update in class ServerInfo
Parameters:
name - The name of the server.
address - The IP-address of the server.
port - The port number in which clients may connect.
slotsAvailable - Number of players that may conncet.
currentlyPlaying - Number of players that are currently connected.
isGameStarted - true if the game has started.
version - The version of the server.
gameState - The current state of the game.

getLastUpdated

public long getLastUpdated()
Returns the last time this object was updated.

Returns:
The timestamp of the last time this object was updated, as returned by System.currentTimeMillis().