Package uk.num.numlib.internal.dns
Class DNSServicesDefaultImpl
- java.lang.Object
-
- uk.num.numlib.internal.dns.DNSServicesDefaultImpl
-
- All Implemented Interfaces:
DNSServices
public class DNSServicesDefaultImpl extends java.lang.Object implements DNSServices
A default implementation of the DNSServices interface.
-
-
Constructor Summary
Constructors Constructor Description DNSServicesDefaultImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xbill.DNS.Record[]getConfigFileTXTRecords(java.lang.String moduleId, int timeoutMillis)Get the Module Configuration from DNS as an array of Recordsorg.xbill.DNS.Record[]getRecordFromDns(java.lang.String query, int timeoutMillis, boolean checkDnsSecValidity)Get a NUM record from DNS.java.lang.StringrebuildTXTRecordContent(org.xbill.DNS.Record[] records)Concatenate an array of TXT record values to a single String
-
-
-
Method Detail
-
getConfigFileTXTRecords
public org.xbill.DNS.Record[] getConfigFileTXTRecords(java.lang.String moduleId, int timeoutMillis) throws NumInvalidDNSQueryException, NumDNSQueryExceptionGet the Module Configuration from DNS as an array of Records- Specified by:
getConfigFileTXTRecordsin interfaceDNSServices- Parameters:
moduleId- The module Id StringtimeoutMillis- The number of milliseconds to wait for a response.- Returns:
- An array of Records
- Throws:
NumInvalidDNSQueryException- on errorNumDNSQueryException- on error
-
rebuildTXTRecordContent
public java.lang.String rebuildTXTRecordContent(org.xbill.DNS.Record[] records)
Concatenate an array of TXT record values to a single String- Specified by:
rebuildTXTRecordContentin interfaceDNSServices- Parameters:
records- The array of Records- Returns:
- The concatenated result.
-
getRecordFromDns
public org.xbill.DNS.Record[] getRecordFromDns(java.lang.String query, int timeoutMillis, boolean checkDnsSecValidity) throws NumNotImplementedException, NumInvalidDNSQueryExceptionGet a NUM record from DNS.- Specified by:
getRecordFromDnsin interfaceDNSServices- Parameters:
query- The NUM formatted DNS query.timeoutMillis- The number of milliseconds to wait for a response.checkDnsSecValidity- true if the result should be checked for DNSSEC validity.- Returns:
- An array of Records
- Throws:
NumNotImplementedException- on errorNumInvalidDNSQueryException- on error
-
-