net.barkerjr.gameserver.gamespy
Class Battlefield1942Server
java.lang.Object
net.barkerjr.gameserver.Base
net.barkerjr.gameserver.GameServer
net.barkerjr.gameserver.UdpServer
net.barkerjr.gameserver.gamespy.GameSpyServer
net.barkerjr.gameserver.gamespy.Battlefield1942Server
- All Implemented Interfaces:
- Closeable
public class Battlefield1942Server
- extends GameSpyServer
Provides generic parsing and querying for Battlefield 1942 servers
- Since:
- 2007-11-18
- Author:
- BarkerJr
- See Also:
- Specification
| Fields inherited from class net.barkerjr.gameserver.GameServer |
address, botCount, dedicated, gameDirectory, IPTOS_RELIABILITY, map, maximumPlayers, name, namespace, numberOfPlayers, passwordRequired, players, plugins, rules, updated, version |
| Fields inherited from class net.barkerjr.gameserver.Base |
listeners |
| Methods inherited from class net.barkerjr.gameserver.GameServer |
addPlugin, equals, fireChangeEvent, fireLoadEvent, getBotCount, getDedicated, getGameDirectory, getIP, getMap, getMaximumPlayers, getName, getNumberOfPlayers, getPlayers, getPlugins, getPort, getRules, getUpdated, getVersion, handleError, hashCode, isPasswordRequired, load, replaceChild, toString, toXmlDocument |
Battlefield1942Server
public Battlefield1942Server(InetSocketAddress address)
- Sets up the basic server information and DOM
- Parameters:
address - the address of the server- Since:
- 2007-11-18
getInstance
public static Battlefield1942Server getInstance(InetSocketAddress address)
- Gets or creates an instance of the server at the given address.
- Parameters:
address - the address of the server
- Returns:
- the server
- Since:
- 2007-11-18
storePair
protected GameServer.Request storePair(String key,
String value)
- Description copied from class:
GameSpyServer
- Processes and persists the given key/value pair in the DOM
- Overrides:
storePair in class GameSpyServer
- Parameters:
key - the key for the rule, etcvalue - the value of the given key
- Returns:
- the request type this data belongs to, or null if it
was not persisted
- Since:
- 2007-11-18
toJsonObject
@Deprecated
public JSONObject toJsonObject()
throws JSONException
- Deprecated. since 2010-03-23, use
JSON.toJSON(GameServer)
- Description copied from class:
GameServer
- Converts the server into a JSON object
- Overrides:
toJsonObject in class GameSpyServer
- Returns:
- the object describing this server
- Throws:
JSONException - if an error occurs- Since:
- 2009-05-02
getLanguage
public String getLanguage()
- The language of the server
- Returns:
- the language of the server
- Since:
- 2009-05-02