public class LockInfo extends SampMap
AbstractMap.SimpleEntry, AbstractMap.SimpleImmutableEntry| Modifier and Type | Field and Description | 
|---|---|
| static String | DEFAULT_VERSION_VALUESAMP Standard Profile version for this toolkit implementation. | 
| static String | SECRET_KEYKey for opaque text string required by the hub for registration. | 
| static String | VERSION_KEYKey for the SAMP Standard Profile version implemented by the hub. | 
| static String | XMLRPCURL_KEYKey for XML-RPC endpoint for communication with the hub. | 
| Constructor and Description | 
|---|
| LockInfo()Constructs an empty LockInfo. | 
| LockInfo(Map map)Constructs a LockInfo based on an existing map. | 
| LockInfo(String secret,
        String xmlrpcurl)Constructs a LockInfo from a given SAMP secret and XML-RPC URL. | 
| Modifier and Type | Method and Description | 
|---|---|
| static LockInfo | asLockInfo(Map map)Returns a given map as a LockInfo object. | 
| void | check()Checks that this object is ready for use with the SAMP toolkit. | 
| String | getSecret()Returns the value of the  SECRET_KEYkey. | 
| String | getVersion()Returns the value of the  VERSION_KEYkey. | 
| URL | getXmlrpcUrl()Returns the value of the  XMLRPCURL_KEYkey. | 
| static LockInfo | readLockFile(InputStream in)Returns the LockInfo read from a given stream. | 
| static LockInfo | readLockFile(URL url)Returns a LockInfo as read from a lockfile at a given location. | 
checkHasKeys, entrySet, getList, getMap, getString, getUrl, putclear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic static final String SECRET_KEY
public static final String XMLRPCURL_KEY
public static final String VERSION_KEY
public static final String DEFAULT_VERSION_VALUE
public LockInfo()
public LockInfo(Map map)
map - map containing initial data for this objectpublic LockInfo(String secret, String xmlrpcurl)
secret - value for SECRET_KEY keyxmlrpcurl - value for XMLRPCURL_KEY keypublic URL getXmlrpcUrl()
XMLRPCURL_KEY key.public String getVersion()
VERSION_KEY key.public String getSecret()
SECRET_KEY key.public void check()
SampMapSampUtils.checkMap(java.util.Map) (ensuring that all keys
 are Strings, and all values Strings, Lists or Maps), subclass-specific
 invariants may be checked.  In the case that there's something wrong,
 an informative DataException will be thrown.public static LockInfo readLockFile(URL url) throws IOException
url - lockfile locationIOExceptionpublic static LockInfo readLockFile(InputStream in) throws IOException
in - input stream to readIOExceptionCopyright © 2008–2024. All rights reserved.