Package org.astrogrid.samp
Class RegInfo
java.lang.Object
java.util.AbstractMap
org.astrogrid.samp.SampMap
org.astrogrid.samp.RegInfo
- All Implemented Interfaces:
Map
Represents information provided to a client at registration by the hub.
- Since:
- 14 Jul 2008
- Author:
- Mark Taylor
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringKey for client public-id used by hub when sending messages itself.static final StringKey for private-key token used for communications between hub and registering client (Standard Profile).static final StringKey for client public-id owned by the registering application. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RegInfoReturns a given map as a RegInfo.voidcheck()Checks that this object is ready for use with the SAMP toolkit.getHubId()Returns the hub's own public client id.Returns the registered client's private key (Standard Profile).Returns the registered client's public client id.Methods inherited from class org.astrogrid.samp.SampMap
checkHasKeys, entrySet, getList, getMap, getString, getUrl, putMethods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
HUBID_KEY
Key for client public-id used by hub when sending messages itself.- See Also:
-
SELFID_KEY
Key for client public-id owned by the registering application.- See Also:
-
PRIVATEKEY_KEY
Key for private-key token used for communications between hub and registering client (Standard Profile).- See Also:
-
-
Constructor Details
-
RegInfo
public RegInfo()Constructs an empty RegInfo. -
RegInfo
Constructs a RegInfo based on an existing map.- Parameters:
map- map containing initial data for this object
-
-
Method Details
-
getHubId
Returns the hub's own public client id.- Returns:
HUBID_KEYvalue
-
getSelfId
Returns the registered client's public client id.- Returns:
SELFID_KEYvalue
-
getPrivateKey
Returns the registered client's private key (Standard Profile).- Returns:
PRIVATEKEY_KEYvalue
-
check
public void check()Description copied from class:SampMapChecks that this object is ready for use with the SAMP toolkit. As well as callingSampUtils.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 informativeDataExceptionwill be thrown. -
asRegInfo
Returns a given map as a RegInfo.- Parameters:
map- map- Returns:
- registration info
-