Class RegInfo

All Implemented Interfaces:
Map

public class RegInfo extends SampMap
Represents information provided to a client at registration by the hub.
Since:
14 Jul 2008
Author:
Mark Taylor
  • Field Details

    • HUBID_KEY

      public static final String HUBID_KEY
      Key for client public-id used by hub when sending messages itself.
      See Also:
    • SELFID_KEY

      public static final String SELFID_KEY
      Key for client public-id owned by the registering application.
      See Also:
    • PRIVATEKEY_KEY

      public static final String 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

      public RegInfo(Map map)
      Constructs a RegInfo based on an existing map.
      Parameters:
      map - map containing initial data for this object
  • Method Details

    • getHubId

      public String getHubId()
      Returns the hub's own public client id.
      Returns:
      HUBID_KEY value
    • getSelfId

      public String getSelfId()
      Returns the registered client's public client id.
      Returns:
      SELFID_KEY value
    • getPrivateKey

      public String getPrivateKey()
      Returns the registered client's private key (Standard Profile).
      Returns:
      PRIVATEKEY_KEY value
    • check

      public void check()
      Description copied from class: SampMap
      Checks that this object is ready for use with the SAMP toolkit. As well as calling 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.
      Overrides:
      check in class SampMap
    • asRegInfo

      public static RegInfo asRegInfo(Map map)
      Returns a given map as a RegInfo.
      Parameters:
      map - map
      Returns:
      registration info