public abstract class DNSEntry
extends java.lang.Object
| 限定符和类型 | 方法和说明 |
|---|---|
int |
compareTo(DNSEntry that)
Does a lexicographic comparison of the byte array representation of this record and that record.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getKey()
Returns the key for this entry.
|
java.lang.String |
getName()
Returns the name of this entry
|
java.util.Map<ServiceInfo.Fields,java.lang.String> |
getQualifiedNameMap() |
DNSRecordClass |
getRecordClass() |
DNSRecordType |
getRecordType() |
java.lang.String |
getSubtype()
Returns the subtype of this entry
|
java.lang.String |
getType() |
int |
hashCode()
Overriden, to return a value which is consistent with the value returned by equals(Object).
|
boolean |
isDomainDiscoveryQuery() |
abstract boolean |
isExpired(long now)
Check if the record is expired.
|
boolean |
isReverseLookup() |
boolean |
isSameEntry(DNSEntry entry)
Check if two entries have exactly the same name, type, and class.
|
boolean |
isSameRecordClass(DNSEntry entry)
Check that 2 entries are of the same class.
|
boolean |
isSameType(DNSEntry entry)
Check that 2 entries are of the same type.
|
boolean |
isServicesDiscoveryMetaQuery() |
abstract boolean |
isStale(long now)
Check if the record is stale, i.e. it has outlived more than half of its TTL.
|
boolean |
isUnique() |
boolean |
isV4ReverseLookup() |
boolean |
isV6ReverseLookup() |
boolean |
matchRecordClass(DNSRecordClass recordClass)
Check if the requested record class match the current record class
|
boolean |
matchRecordType(DNSRecordType recordType)
Check if the requested record tyep match the current record type
|
boolean |
sameSubtype(DNSEntry other)
Check if two entries have the same subtype.
|
protected byte[] |
toByteArray()
Creates a byte array representation of this record.
|
protected void |
toByteArray(java.io.DataOutputStream dout) |
java.lang.String |
toString() |
protected void |
toString(java.lang.StringBuilder sb) |
public boolean equals(java.lang.Object obj)
equals 在类中 java.lang.Objectpublic boolean isSameEntry(DNSEntry entry)
entry - true if the two entries have are for the same record, false otherwisepublic boolean sameSubtype(DNSEntry other)
other - true if the two entries have are for the same subtype, false otherwisepublic boolean matchRecordClass(DNSRecordClass recordClass)
recordClass - true if the two entries have compatible class, false otherwisepublic boolean matchRecordType(DNSRecordType recordType)
recordType - true if the two entries have compatible type, false otherwisepublic java.lang.String getSubtype()
public java.lang.String getName()
public java.lang.String getType()
public java.lang.String getKey()
public DNSRecordType getRecordType()
public DNSRecordClass getRecordClass()
public boolean isUnique()
public java.util.Map<ServiceInfo.Fields,java.lang.String> getQualifiedNameMap()
public boolean isServicesDiscoveryMetaQuery()
public boolean isDomainDiscoveryQuery()
public boolean isReverseLookup()
public boolean isV4ReverseLookup()
public boolean isV6ReverseLookup()
public abstract boolean isStale(long now)
now - update datetrue is the record is stale, false otherwise.public abstract boolean isExpired(long now)
now - update datetrue is the record is expired, false otherwise.public boolean isSameRecordClass(DNSEntry entry)
entry - true is the two class are the same, false otherwise.public boolean isSameType(DNSEntry entry)
entry - true is the two type are the same, false otherwise.protected void toByteArray(java.io.DataOutputStream dout)
throws java.io.IOException
dout - java.io.IOExceptionprotected byte[] toByteArray()
public int compareTo(DNSEntry that)
that - public int hashCode()
hashCode 在类中 java.lang.Objectpublic java.lang.String toString()
toString 在类中 java.lang.Objectprotected void toString(java.lang.StringBuilder sb)
sb -