java.lang.Object
org.minidns.edns.Edns.Builder
- Enclosing class:
Edns
Builder for creating EDNS instances.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanTrue when DNSSEC is acceptable.private intThe extended response code.private intThe UDP payload size to advertise.private List<EdnsOption> The EDNS options to carry.private intThe EDNS version.Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionaddEdnsOption(EdnsOption ednsOption) Adds an EDNS option.build()Builds the EDNS instance.Sets the DNSSEC OK flag to true.setDnssecOk(boolean dnssecOk) Sets the DNSSEC OK flag.setUdpPayloadSize(int udpPayloadSize) Sets the UDP payload size.
Field Details
udpPayloadSize
private int udpPayloadSizeThe UDP payload size to advertise.extendedRcode
private int extendedRcodeThe extended response code.version
private int versionThe EDNS version.dnssecOk
private boolean dnssecOkTrue when DNSSEC is acceptable.variablePart
The EDNS options to carry.
Constructor Details
Builder
private Builder()Builds a builder with default values.
Method Details
setUdpPayloadSize
Sets the UDP payload size.- Parameters:
udpPayloadSize- the UDP payload size- Returns:
- this builder, so that calls can be chained
- Throws:
IllegalArgumentException- if the payload size is greater than 65536
setDnssecOk
Sets the DNSSEC OK flag.- Parameters:
dnssecOk- whether DNSSEC OK flag should be set- Returns:
- this builder, so that calls can be chained
setDnssecOk
Sets the DNSSEC OK flag to true.- Returns:
- this builder, so that calls can be chained
addEdnsOption
Adds an EDNS option.- Parameters:
ednsOption- the EDNS option to add- Returns:
- this builder, so that calls can be chained
build