[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

DNSResolver

inherits from Object
inherits from PDUClientInterface

Object <- DNSResolver



Operations

Get list of all operations

ClearAddressCache
GetHostByAddress
GetHostByName
HandlePDU
RegisterDNS
ResetClass
UnregisterAllDNS
UnregisterDNS


Attributes

Get list of all attributes

Class DNSResolver defines no new attributes.


Fields

Field Type
DNSResolver: server: PDUServer
dnsList: IntegerList
dnrID: UnsignedShort
cache: ObjectList
lastClearedDate: Signed


Instance template

instance DNSResolver tag;
         server: nilObject;
        dnsList: nilObject;
          dnrID: 0;
          cache: nilObject;
lastClearedDate: 0;
end instance;

Class definition

Define Class DNSResolver;
    inherits from Object;
    inherits from PDUClientInterface;

    field server: PDUServer;
    field dnsList: IntegerList;             
        // list of domain name servers to query
    field dnrID: UnsignedShort;             
        // next id
    field cache: ObjectList;                
        // list of cache nodes, newest last
    field lastClearedDate: Signed;          
        // last day the cache was cleared

    overrides ResetClass;
        // unregisters all DNS entries and clears the cache
    overrides HandlePDU;

    // DNS lookups.  GetHostByName & GetHostByAddress throw an iDNSLookupFailed
    // exception when a DNS lookup fails, or iNoDNSRegistered if no DNS
    // was registered to provide lookups
    
    operation GetHostByName(hostName: Text): Unsigned;
        // returns the IP address for a 'hostName' of the form "host.acme.net"
        // by doing a DNS lookup.
    operation GetHostByAddress(ipAddress: Unsigned): Text;
        // returns the host name for 'ipAddress' by doing a DNS lookup.  
        
    operation RegisterDNS(ipAddress: Unsigned);
        // adds the DNS to the end of the list of DNSes to query
    operation UnregisterDNS(ipAddress: Unsigned);
        // removes the DNS from the list of DNSes to query

    operation UnregisterAllDNS();
        // clears out the list of registered DNSes
    operation ClearAddressCache();
        // removes all entries cached from DNS lookups
end class;