Package org.xbill.DNS
Class TcpKeepaliveOption
java.lang.Object
org.xbill.DNS.EDNSOption
org.xbill.DNS.TcpKeepaliveOption
- All Implemented Interfaces:
Serializable
TCP Keepalive EDNS0 Option, as defined in https://datatracker.ietf.org/doc/html/rfc7828
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.xbill.DNS.EDNSOption
EDNSOption.Code -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for an option with no timeoutTcpKeepaliveOption(int t) Constructor for an option with a given timeout.Constructor for an option with a given timeout. -
Method Summary
Modifier and TypeMethodDescriptionReturns the timeout.Returns the timeout as aDuration.(package private) voidConverts the wire format of an EDNS Option (the option data only) into the type-specific format.(package private) StringReturns a string representation of the option parameters.(package private) voidoptionToWire(DNSOutput out) Converts an EDNS Option (the type-specific option data only) into wire format.
-
Field Details
-
timeout
the timeout -
UPPER_LIMIT
upper limit of the duration (exclusive)
-
-
Constructor Details
-
TcpKeepaliveOption
public TcpKeepaliveOption()Constructor for an option with no timeout -
TcpKeepaliveOption
public TcpKeepaliveOption(int t) Constructor for an option with a given timeout.- Parameters:
t- the timeout time in 100ms units, may not be negative or larger than 65535
-
TcpKeepaliveOption
Constructor for an option with a given timeout. As the timeout has a coarser granularity than theDurationclass, values are rounded down.- Parameters:
t- the timeout time, must not be negative and must be lower than 6553.5 seconds
-
-
Method Details
-
getTimeout
Returns the timeout.- Returns:
- the timeout in 100ms units
-
getTimeoutDuration
Returns the timeout as aDuration.- Returns:
- the timeout
-
optionFromWire
Converts the wire format of an EDNS Option (the option data only) into the type-specific format.- Specified by:
optionFromWirein classEDNSOption- Parameters:
in- The input stream.- Throws:
IOException
-
optionToWire
Converts an EDNS Option (the type-specific option data only) into wire format.- Specified by:
optionToWirein classEDNSOption- Parameters:
out- The output stream.
-
optionToString
String optionToString()Returns a string representation of the option parameters.- Specified by:
optionToStringin classEDNSOption- Returns:
- the string representation
-