public class RegInfo extends SampMap
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HUBID_KEY
Key for client public-id used by hub when sending messages itself.
|
private static java.lang.String[] |
KNOWN_KEYS |
static java.lang.String |
PRIVATEKEY_KEY
Key for private-key token used for communications between hub and
registering client (Standard Profile).
|
static java.lang.String |
SELFID_KEY
Key for client public-id owned by the registering application.
|
Constructor and Description |
---|
RegInfo()
Constructs an empty RegInfo.
|
RegInfo(java.util.Map map)
Constructs a RegInfo based on an existing map.
|
Modifier and Type | Method and Description |
---|---|
static RegInfo |
asRegInfo(java.util.Map map)
Returns a given map as a RegInfo.
|
void |
check()
Checks that this object is ready for use with the SAMP toolkit.
|
java.lang.String |
getHubId()
Returns the hub's own public client id.
|
java.lang.String |
getPrivateKey()
Returns the registered client's private key (Standard Profile).
|
java.lang.String |
getSelfId()
Returns the registered client's public client id.
|
checkHasKeys, entrySet, getList, getMap, getString, getUrl, put
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, toString, values
public static final java.lang.String HUBID_KEY
public static final java.lang.String SELFID_KEY
public static final java.lang.String PRIVATEKEY_KEY
private static final java.lang.String[] KNOWN_KEYS
public RegInfo()
public RegInfo(java.util.Map map)
map
- map containing initial data for this objectpublic java.lang.String getHubId()
HUBID_KEY
valuepublic java.lang.String getSelfId()
SELFID_KEY
valuepublic java.lang.String getPrivateKey()
PRIVATEKEY_KEY
valuepublic void check()
SampMap
SampUtils.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 RegInfo asRegInfo(java.util.Map map)
map
- map