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.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMATCH_MULTIPART_RECORD_FRAGMENT
-
Constructor Summary
Constructors Constructor Description DNSServicesDefaultImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xbill.DNS.Record[]getRecordFromDnsNoCache(NonBlankString query, int timeoutMillis)Get a NUM record from DNS without caching.java.lang.StringrebuildTXTRecordContent(org.xbill.DNS.Record[] records)Concatenate an array of TXT record values to a single String
-
-
-
Field Detail
-
MATCH_MULTIPART_RECORD_FRAGMENT
public static final java.lang.String MATCH_MULTIPART_RECORD_FRAGMENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
rebuildTXTRecordContent
public java.lang.String rebuildTXTRecordContent(org.xbill.DNS.Record[] records) throws RrSetNoHeadersException, RrSetHeaderFormatException, RrSetIncompleteExceptionConcatenate an array of TXT record values to a single String- Specified by:
rebuildTXTRecordContentin interfaceDNSServices- Parameters:
records- The array of Records- Returns:
- The concatenated result.
- Throws:
RrSetNoHeadersException- on errorRrSetHeaderFormatException- on errorRrSetIncompleteException- on error
-
getRecordFromDnsNoCache
public org.xbill.DNS.Record[] getRecordFromDnsNoCache(NonBlankString query, int timeoutMillis) throws NumInvalidDNSQueryException, NumNoRecordAvailableException
Get a NUM record from DNS without caching.- Specified by:
getRecordFromDnsNoCachein interfaceDNSServices- Parameters:
query- The NUM formatted DNS query.timeoutMillis- The number of milliseconds to wait for a response.- Returns:
- An array of Records
- Throws:
NumInvalidDNSQueryException- on errorNumNoRecordAvailableException- if a CNAME or SPF record is received instead of a TXT record
-
-