Class NumAPIImpl

  • All Implemented Interfaces:
    NumAPI

    public class NumAPIImpl
    extends java.lang.Object
    implements NumAPI
    This is the main class for using the num-client-library. Use the default constructor to use the DNS servers configured on your local machine, or override these by supplying a specific DNS host domain name using the alternative constructor.
    • Constructor Summary

      Constructors 
      Constructor Description
      NumAPIImpl()
      Default constructor to initialise the default DNS services and MODL services.
      NumAPIImpl​(java.lang.String[] dnsHosts)
      Support multiple DNS hosts.
      NumAPIImpl​(java.lang.String dnsHost, int port)
      Alternative constructor used to override the default DNS host and port.
      NumAPIImpl​(DNSServices dnsServices, java.lang.String dnsHost)
      Alternative constructor used to override the default DNS hosts.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      NumAPIContext begin​(java.lang.String moduleId, java.lang.String numId, int timeoutMillis)
      Initialise a new NumAPIContextBase object for a specific module/NUM ID combination.
      java.util.concurrent.Future<java.lang.String> retrieveNumRecord​(NumAPIContext ctx, NumAPICallbacks handler, int timeoutMillis)
      This method uses the module context and the supplied Required User Variable values to obtain a fully expanded JSON object from DNS.
      void setPopulatorTopLevelZone​(java.lang.String populatorTopLevelZone)
      Override the populatortop-level zone from 'num.uk' to 'myzone.com' for example.
      void setTCPOnly​(boolean flag)
      Tell dnsjava to use TCP and not UDP.
      void setTopLevelZone​(java.lang.String zone)
      Override the top-level zone from 'num.uk' to 'myzone.com' for example.
      void shutdown()
      Stop any outstanding DNS queries still in the Executor.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait