use of org.minidns.hla.ResolutionUnsuccessfulException in project Smack by igniterealtime.
the class MiniDnsResolver method getExceptionFrom.
private static ResolutionUnsuccessfulException getExceptionFrom(ResolverResult<?> result) {
Question question = result.getQuestion();
RESPONSE_CODE responseCode = result.getResponseCode();
ResolutionUnsuccessfulException resolutionUnsuccessfulException = new ResolutionUnsuccessfulException(question, responseCode);
return resolutionUnsuccessfulException;
}
use of org.minidns.hla.ResolutionUnsuccessfulException in project Smack by igniterealtime.
the class MiniDnsResolver method lookupSrvRecords0.
@Override
protected Set<SRV> lookupSrvRecords0(final DnsName name, List<RemoteConnectionEndpointLookupFailure> lookupFailures, DnssecMode dnssecMode) {
final ResolverApi resolver = getResolver(dnssecMode);
SrvResolverResult result;
try {
result = resolver.resolveSrv(name);
} catch (IOException e) {
RemoteConnectionEndpointLookupFailure failure = new RemoteConnectionEndpointLookupFailure.DnsLookupFailure(name, e);
lookupFailures.add(failure);
return null;
}
ResolutionUnsuccessfulException resolutionUnsuccessfulException = result.getResolutionUnsuccessfulException();
if (resolutionUnsuccessfulException != null) {
RemoteConnectionEndpointLookupFailure failure = new RemoteConnectionEndpointLookupFailure.DnsLookupFailure(name, resolutionUnsuccessfulException);
lookupFailures.add(failure);
return null;
}
if (shouldAbortIfNotAuthentic(name, dnssecMode, result, lookupFailures)) {
return null;
}
return result.getAnswers();
}
Aggregations