Package org.microproxy.dns
Record Class DnsMessage.Soa
java.lang.Object
java.lang.Record
org.microproxy.dns.DnsMessage.Soa
- Record Components:
mname- the zone's primary name serverrname- the mailbox of the person responsible, as a nameserial- the zone's serial numberrefresh- the secondaries' refresh interval, in secondsretry- the secondaries' retry interval, in secondsexpire- when secondaries stop answering without a refresh, in secondsminimum- the TTL of negative answers, in seconds (RFC 2308)
- All Implemented Interfaces:
DnsMessage.Rdata
- Enclosing class:
DnsMessage
public static record DnsMessage.Soa(String mname, String rname, long serial, long refresh, long retry, long expire, long minimum)
extends Record
implements DnsMessage.Rdata
The data of an SOA record.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]encode(int type) The RDATA for a record oftype.final booleanIndicates whether some other object is "equal to" this one.longexpire()Returns the value of theexpirerecord component.final inthashCode()Returns a hash code value for this object.longminimum()Returns the value of theminimumrecord component.mname()Returns the value of themnamerecord component.longrefresh()Returns the value of therefreshrecord component.longretry()Returns the value of theretryrecord component.rname()Returns the value of thernamerecord component.longserial()Returns the value of theserialrecord component.text()Returns the data in presentation format, as a zone file shows it.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Soa
public Soa(String mname, String rname, long serial, long refresh, long retry, long expire, long minimum) Checks the names.- Parameters:
mname- the zone's primary name serverrname- the mailbox of the person responsibleserial- the serial numberrefresh- the refresh intervalretry- the retry intervalexpire- the expiryminimum- the negative TTL
-
-
Method Details
-
text
Description copied from interface:DnsMessage.RdataReturns the data in presentation format, as a zone file shows it.- Specified by:
textin interfaceDnsMessage.Rdata- Returns:
- the data in presentation format, as a zone file shows it
-
encode
public byte[] encode(int type) Description copied from interface:DnsMessage.RdataThe RDATA for a record oftype.- Specified by:
encodein interfaceDnsMessage.Rdata- Parameters:
type- the record's type- Returns:
- the RDATA bytes
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
mname
Returns the value of themnamerecord component.- Returns:
- the value of the
mnamerecord component
-
rname
Returns the value of thernamerecord component.- Returns:
- the value of the
rnamerecord component
-
serial
public long serial()Returns the value of theserialrecord component.- Returns:
- the value of the
serialrecord component
-
refresh
public long refresh()Returns the value of therefreshrecord component.- Returns:
- the value of the
refreshrecord component
-
retry
public long retry()Returns the value of theretryrecord component.- Returns:
- the value of the
retryrecord component
-
expire
public long expire()Returns the value of theexpirerecord component.- Returns:
- the value of the
expirerecord component
-
minimum
public long minimum()Returns the value of theminimumrecord component.- Returns:
- the value of the
minimumrecord component
-