java.lang.Object
org.minidns.record.Data
org.minidns.record.SOA
DNS SOA (Start of Authority) record payload.
Contains authoritative information about a DNS zone including primary nameserver, admin email, and timing parameters.
Contains authoritative information about a DNS zone including primary nameserver, admin email, and timing parameters.
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intA 32 bit time value that specifies the upper limit on the time interval that can elapse before the zone is no longer authoritative.final longThe unsigned 32 bit minimum TTL field that should be exported with any RR from this zone.final DnsNameThe domain name of the name server that was the original or primary source of data for this zone.final intA 32 bit time interval before the zone should be refreshed.final intA 32 bit time interval that should elapse before a failed refresh should be retried.final DnsNameA domain name which specifies the mailbox of the person responsible for this zone.final longThe unsigned 32 bit version number of the original copy of the zone.Constructor Summary
ConstructorsConstructorDescriptionCreate an SOA record from names in presentation form.Create an SOA record from already parsed names.Method Summary
Modifier and TypeMethodDescriptiongetType()Return the record type of this payload.static SOAparse(DataInputStream dis, byte[] data) Parse an SOA record payload from a DNS message.voidWrite the seven authority fields to a DNS output stream.toString()Return the zone's authority data in presentation format.Methods inherited from class Data
equals, hashCode, length, toByteArray, toOutputStream, toOutputStreamModifier and TypeMethodDescriptionfinal booleanfinal inthashCode()final intlength()Serialize this record, if that has not been done already, and report the resulting wire size.final byte[]Serialize this record, if that has not been done already, and return a copy of the result so callers cannot mutate the cached bytes.final voidWrite the binary representation of this payload to the givenDataOutputStream.final voidtoOutputStream(OutputStream outputStream) Write the binary representation to the given OutputStream.
Field Details
mname
The domain name of the name server that was the original or primary source of data for this zone.rname
A domain name which specifies the mailbox of the person responsible for this zone.serial
public final long serialThe unsigned 32 bit version number of the original copy of the zone. Zone transfers preserve this value. This value wraps and should be compared using sequence space arithmetic.refresh
public final int refreshA 32 bit time interval before the zone should be refreshed.retry
public final int retryA 32 bit time interval that should elapse before a failed refresh should be retried.expire
public final int expireA 32 bit time value that specifies the upper limit on the time interval that can elapse before the zone is no longer authoritative.minimum
public final long minimumThe unsigned 32 bit minimum TTL field that should be exported with any RR from this zone.
Constructor Details
SOA
public SOA(String mname, String rname, long serial, int refresh, int retry, int expire, long minimum) Create an SOA record from names in presentation form.- Parameters:
mname- the primary nameserver for the zone, in presentation formrname- the mailbox of the zone administrator, in presentation formserial- the unsigned 32 bit version number of the zone copyrefresh- seconds to wait before the zone should be refreshedretry- seconds to wait before a failed refresh is retriedexpire- seconds after which the zone is no longer authoritativeminimum- the unsigned 32 bit minimum TTL exported with any RR from the zone
SOA
public SOA(DnsName mname, DnsName rname, long serial, int refresh, int retry, int expire, long minimum) Create an SOA record from already parsed names.- Parameters:
mname- the primary nameserver for the zonername- the mailbox of the zone administratorserial- the unsigned 32 bit version number of the zone copyrefresh- seconds to wait before the zone should be refreshedretry- seconds to wait before a failed refresh is retriedexpire- seconds after which the zone is no longer authoritativeminimum- the unsigned 32 bit minimum TTL exported with any RR from the zone
Method Details
parse
Parse an SOA record payload from a DNS message.- Parameters:
dis- the stream positioned at the start of the SOA record payloaddata- the raw DNS message data, needed to resolve compressed names- Returns:
- the parsed SOA record
- Throws:
IOException- on parse error
getType
Return the record type of this payload.serialize
Write the seven authority fields to a DNS output stream.- Specified by:
serializein classData- Parameters:
dos- the output stream to serialize to.- Throws:
IOException- if an I/O error occurs.
toString