public abstract class DNSEntry
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
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.
|
boolean |
isUnique() |
boolean |
isV4ReverseLookup() |
boolean |
isV6ReverseLookup() |
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 aLog) |
public boolean equals(java.lang.Object obj)
equals in class 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 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 in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectprotected void toString(java.lang.StringBuilder aLog)
aLog -