net.sf.freecol.metaserver
Class MetaItem
java.lang.Object
net.sf.freecol.common.ServerInfo
net.sf.freecol.metaserver.MetaItem
public class MetaItem
- extends ServerInfo
This object stores information about a single running server.
|
Field Summary |
private long |
lastUpdated
|
private static java.util.logging.Logger |
logger
|
|
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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
logger
private static java.util.logging.Logger logger
lastUpdated
private long lastUpdated
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.
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().