public class ServerVersion
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
MPT_TOOL_PARAM_MIN_VERSION |
Constructor and Description |
---|
ServerVersion(java.lang.String netConnect,
int apiVersion) |
ServerVersion(java.lang.String netConnect,
java.lang.String version) |
ServerVersion(java.lang.String netConnect,
java.lang.String version,
int apiVersion) |
Modifier and Type | Method and Description |
---|---|
static ServerVersion |
fromJSON(java.lang.String netConnect,
org.json.JSONObject obj) |
int |
getApiVersion() |
java.lang.String |
getNetConnect() |
java.lang.String |
getVersion() |
boolean |
hasApiVersion() |
boolean |
hasVersion() |
static boolean |
includeToolParam(java.lang.String hostname)
Prior to TAK Server 1.3.6 API ver=2 the 'tool' param was not supported
|
boolean |
isValid() |
void |
setApiVersion(int apiVersion) |
void |
setVersion(java.lang.String version) |
java.lang.String |
toString() |
public static final int MPT_TOOL_PARAM_MIN_VERSION
public ServerVersion(java.lang.String netConnect, java.lang.String version)
public ServerVersion(java.lang.String netConnect, int apiVersion)
public ServerVersion(java.lang.String netConnect, java.lang.String version, int apiVersion)
public int getApiVersion()
public java.lang.String getNetConnect()
public java.lang.String getVersion()
public boolean hasVersion()
public void setVersion(java.lang.String version)
public void setApiVersion(int apiVersion)
public boolean hasApiVersion()
public boolean isValid()
public java.lang.String toString()
toString
in class java.lang.Object
public static ServerVersion fromJSON(java.lang.String netConnect, org.json.JSONObject obj) throws org.json.JSONException
org.json.JSONException
public static boolean includeToolParam(java.lang.String hostname)
hostname
- hostname (not Server Connect String or base URL)