@UnstableApi public abstract class AbstractDnsRecord extends java.lang.Object implements DnsRecord
DnsRecord
.Modifier and Type | Field and Description |
---|---|
private short |
dnsClass |
private int |
hashCode |
private java.lang.String |
name |
private long |
timeToLive |
private DnsRecordType |
type |
CLASS_ANY, CLASS_CHAOS, CLASS_CSNET, CLASS_HESIOD, CLASS_IN, CLASS_NONE
Modifier | Constructor and Description |
---|---|
protected |
AbstractDnsRecord(java.lang.String name,
DnsRecordType type,
int dnsClass,
long timeToLive)
Creates a new record.
|
protected |
AbstractDnsRecord(java.lang.String name,
DnsRecordType type,
long timeToLive)
Creates a new
IN-class record. |
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
appendTrailingDot(java.lang.String name) |
int |
dnsClass()
Returns the class of this resource record.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
java.lang.String |
name()
Returns the name of this resource record.
|
long |
timeToLive()
Returns the time to live after reading for this resource record.
|
java.lang.String |
toString() |
DnsRecordType |
type()
Returns the type of this resource record.
|
private final java.lang.String name
private final DnsRecordType type
private final short dnsClass
private final long timeToLive
private int hashCode
protected AbstractDnsRecord(java.lang.String name, DnsRecordType type, long timeToLive)
IN-class
record.name
- the domain nametype
- the type of the recordtimeToLive
- the TTL value of the recordprotected AbstractDnsRecord(java.lang.String name, DnsRecordType type, int dnsClass, long timeToLive)
name
- the domain nametype
- the type of the recorddnsClass
- the class of the record, usually one of the following:
timeToLive
- the TTL value of the recordprivate static java.lang.String appendTrailingDot(java.lang.String name)
public java.lang.String name()
DnsRecord
public DnsRecordType type()
DnsRecord
public int dnsClass()
DnsRecord
public long timeToLive()
DnsRecord
timeToLive
in interface DnsRecord
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object