public abstract class DNSEntry extends 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(Object obj) |
String |
getKey()
Returns the key for this entry.
|
String |
getName()
Returns the name of this entry
|
Map<ServiceInfo.Fields,String> |
getQualifiedNameMap() |
DNSRecordClass |
getRecordClass() |
DNSRecordType |
getRecordType() |
String |
getSubtype()
Returns the subtype of this entry
|
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(DataOutputStream dout) |
String |
toString() |
protected void |
toString(StringBuilder aLog) |
public 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 String getSubtype()
public String getName()
public String getType()
public String getKey()
public DNSRecordType getRecordType()
public DNSRecordClass getRecordClass()
public boolean isUnique()
public Map<ServiceInfo.Fields,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(DataOutputStream dout) throws IOException
dout
- IOException
protected byte[] toByteArray()
public int compareTo(DNSEntry that)
that
- public int hashCode()
protected void toString(StringBuilder aLog)
aLog
- Copyright © 2002–2018 JmDNS. All rights reserved.