public class MetaItem extends ServerInfo
| Modifier and Type | Field and Description |
|---|---|
private long |
lastUpdated |
private static java.util.logging.Logger |
logger |
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getLastUpdated()
Gets 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.
|
getAddress, getCurrentlyPlaying, getGameState, getName, getPort, getSlotsAvailable, getVersion, getXMLElementTagName, readFromXMLElement, toString, toXMLElement, updateprivate static final java.util.logging.Logger logger
private long lastUpdated
public MetaItem(java.lang.String name,
java.lang.String address,
int port,
int slotsAvailable,
int currentlyPlaying,
boolean isGameStarted,
java.lang.String version,
int gameState)
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 connect.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.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)
update in class ServerInfoname - 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 connect.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.public long getLastUpdated()
System.currentTimeMillis().