public class DNSQuestion extends DNSEntry
| Modifier and Type | Method and Description |
|---|---|
void |
addAnswers(JmDNSImpl jmDNSImpl,
java.util.Set<DNSRecord> answers)
Adds answers to the list for our question.
|
protected void |
addAnswersForServiceInfo(JmDNSImpl jmDNSImpl,
java.util.Set<DNSRecord> answers,
ServiceInfoImpl info) |
boolean |
iAmTheOnlyOne(JmDNSImpl jmDNSImpl)
Checks if we are the only to be able to answer that question.
|
boolean |
isExpired(long now)
Check if the record is expired.
|
boolean |
isStale(long now)
Check if the record is stale, i.e.
|
static DNSQuestion |
newQuestion(java.lang.String name,
DNSRecordType type,
DNSRecordClass recordClass,
boolean unique)
Create a question.
|
void |
toString(java.lang.StringBuilder aLog) |
compareTo, equals, getKey, getName, getQualifiedNameMap, getRecordClass, getRecordType, getSubtype, getType, hashCode, isDomainDiscoveryQuery, isReverseLookup, isSameEntry, isSameRecordClass, isSameType, isServicesDiscoveryMetaQuery, isUnique, isV4ReverseLookup, isV6ReverseLookup, sameSubtype, toByteArray, toByteArray, toStringpublic static DNSQuestion newQuestion(java.lang.String name, DNSRecordType type, DNSRecordClass recordClass, boolean unique)
name - DNS name to be resolvedtype - Record type to resolverecordClass - Record class to resolveunique - Request unicast response (Currently not supported in this implementation)public void addAnswers(JmDNSImpl jmDNSImpl, java.util.Set<DNSRecord> answers)
jmDNSImpl - DNS holding the recordsanswers - List of previous answer to append.protected void addAnswersForServiceInfo(JmDNSImpl jmDNSImpl, java.util.Set<DNSRecord> answers, ServiceInfoImpl info)
public boolean isStale(long now)
DNSEntrypublic boolean isExpired(long now)
DNSEntrypublic boolean iAmTheOnlyOne(JmDNSImpl jmDNSImpl)
jmDNSImpl - DNS holding the recordstrue if we are the only one with the answer to the question, false otherwise.