org.xbill.DNS.Resolver
public class ValidatingResolver extends Object implements org.xbill.DNS.Resolver
Modifier and Type | Field | Description |
---|---|---|
static int |
VALIDATION_REASON_QCLASS |
The QCLASS being used for the injection of the reason why the validator
came to the returned result.
|
Constructor | Description |
---|---|
ValidatingResolver(org.xbill.DNS.Resolver headResolver) |
Creates a new instance of this class.
|
Modifier and Type | Method | Description |
---|---|---|
TrustAnchorStore |
getTrustAnchors() |
Gets the store with the loaded trust anchors.
|
void |
init(Properties config) |
Initialize the module.
|
void |
loadTrustAnchors(InputStream data) |
Load the trust anchor file into the trust anchor store.
|
org.xbill.DNS.Message |
send(org.xbill.DNS.Message query) |
Sends a message and validates the response with DNSSEC before returning
it.
|
Object |
sendAsync(org.xbill.DNS.Message query,
org.xbill.DNS.ResolverListener listener) |
Not implemented.
|
void |
setEDNS(int level) |
This is a no-op, EDNS is always set to level 0.
|
void |
setEDNS(int level,
int payloadSize,
int flags,
List options) |
The method is forwarded to the resolver, but always ensure that the level
is 0 and the flags contains DO.
|
void |
setIgnoreTruncation(boolean flag) |
This is a no-op, truncation is never ignored.
|
void |
setPort(int port) |
Forwards the data to the head resolver passed at construction time.
|
void |
setTCP(boolean flag) |
Forwards the data to the head resolver passed at construction time.
|
void |
setTimeout(int secs) |
Sets the amount of time to wait for a response before giving up.
|
void |
setTimeout(int secs,
int msecs) |
Sets the amount of time to wait for a response before giving up.
|
void |
setTSIGKey(org.xbill.DNS.TSIG key) |
Forwards the data to the head resolver passed at construction time.
|
public static final int VALIDATION_REASON_QCLASS
public ValidatingResolver(org.xbill.DNS.Resolver headResolver)
headResolver
- The resolver to which queries for DS, DNSKEY and
referring CNAME records are sent.public void init(Properties config) throws IOException
config
- The configuration data for this module.IOException
- When the file specified in the config does not exist
or cannot be read.public void loadTrustAnchors(InputStream data) throws IOException
data
- The trust anchor data.IOException
- when the trust anchor data could not be read.public TrustAnchorStore getTrustAnchors()
public void setPort(int port)
setPort
in interface org.xbill.DNS.Resolver
port
- The IP destination port for the queries sent.Resolver.setPort(int)
public void setTCP(boolean flag)
setTCP
in interface org.xbill.DNS.Resolver
flag
- true
to enable TCP, false
to
disable it.Resolver.setTCP(boolean)
public void setIgnoreTruncation(boolean flag)
setIgnoreTruncation
in interface org.xbill.DNS.Resolver
flag
- unusedpublic void setEDNS(int level)
setEDNS
in interface org.xbill.DNS.Resolver
level
- unusedpublic void setEDNS(int level, int payloadSize, int flags, List options)
setEDNS
in interface org.xbill.DNS.Resolver
level
- unused, always set to 0.payloadSize
- The maximum DNS packet size that this host is capable
of receiving over UDP. If 0 is specified, the default (1280)
is used.flags
- EDNS extended flags to be set in the OPT record,
ExtendedFlags.DO
is always appended.options
- EDNS options to be set in the OPT record, specified as a
List of OPTRecord.Option elements.Resolver.setEDNS(int, int, int, java.util.List)
public void setTSIGKey(org.xbill.DNS.TSIG key)
setTSIGKey
in interface org.xbill.DNS.Resolver
key
- The key.Resolver.setTSIGKey(org.xbill.DNS.TSIG)
public void setTimeout(int secs, int msecs)
setTimeout
in interface org.xbill.DNS.Resolver
secs
- The number of seconds to wait.msecs
- The number of milliseconds to wait.public void setTimeout(int secs)
setTimeout
in interface org.xbill.DNS.Resolver
secs
- The number of seconds to wait.public org.xbill.DNS.Message send(org.xbill.DNS.Message query) throws IOException
send
in interface org.xbill.DNS.Resolver
query
- The query to send.IOException
- An error occurred while sending or receiving.public Object sendAsync(org.xbill.DNS.Message query, org.xbill.DNS.ResolverListener listener)
sendAsync
in interface org.xbill.DNS.Resolver
query
- The query to sendlistener
- The object containing the callbacks.UnsupportedOperationException
- AlwaysCopyright © 2018 jitsi.org. All rights reserved.