Skip to content

Commit

Permalink
Add SrvResolverResult.isServiceDecidedlyNotAvailableAtThisDomain()
Browse files Browse the repository at this point in the history
  • Loading branch information
Flowdalic committed Aug 24, 2018
1 parent 5e65847 commit e16837b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions minidns-hla/src/main/java/org/minidns/hla/SrvResolverResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ public List<ResolvedSrvRecord> getSortedSrvResolvedAddresses() throws IOExceptio
return res;
}

public boolean isServiceDecidedlyNotAvailableAtThisDomain() {
Set<SRV> answers = getAnswers();
if (answers.size() != 1) {
return false;
}

SRV singleAnswer = answers.iterator().next();
return !singleAnswer.isServiceAvailable();
}

public static class ResolvedSrvRecord {
public final DnsName name;
public final SrvServiceProto srvServiceProto;
Expand Down

0 comments on commit e16837b

Please sign in to comment.