Package uk.num.numlib.internal.dns
Interface DNSServices
-
- All Known Implementing Classes:
DNSServicesDefaultImpl
public interface DNSServicesThis interface defines the contract for the DNS Service provider.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.xbill.DNS.Record[]getConfigFileTXTRecords(AppContext appContext, java.lang.String moduleId, int timeoutMillis)Get the Module Configuration from DNS as an array of Recordsorg.xbill.DNS.Record[]getRecordFromDnsNoCache(NonBlankString 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
org.xbill.DNS.Record[] getConfigFileTXTRecords(AppContext appContext, java.lang.String moduleId, int timeoutMillis) throws NumInvalidDNSQueryException, NumDNSQueryException
Get the Module Configuration from DNS as an array of Records- Parameters:
appContext- the AppContextmoduleId- 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
java.lang.String rebuildTXTRecordContent(org.xbill.DNS.Record[] records) throws RrSetNoHeadersException, RrSetHeaderFormatException, RrSetIncompleteExceptionConcatenate an array of TXT record values to a single String- Parameters:
records- The array of Records- Returns:
- The concatenated result.
- Throws:
RrSetNoHeadersException- on errorRrSetHeaderFormatException- on errorRrSetIncompleteException- on error
-
getRecordFromDnsNoCache
org.xbill.DNS.Record[] getRecordFromDnsNoCache(NonBlankString query, int timeoutMillis, boolean checkDnsSecValidity) throws NumNotImplementedException, NumInvalidDNSQueryException, NumNoRecordAvailableException
Get a NUM record from DNS.- 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 errorNumNoRecordAvailableException- if a CNAME or SPF record is received instead of a TXT record
-
-