Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.util.dns
Class UnboundResolver

java.lang.Object
  extended by net.java.sip.communicator.util.dns.UnboundResolver
All Implemented Interfaces:
org.xbill.DNS.Resolver
Direct Known Subclasses:
ConfigurableDnssecResolver

public class UnboundResolver
extends Object
implements org.xbill.DNS.Resolver

Implementation of the Resolver interface, wrapping the native NLnet Labs Unbound resolver. Only the basic methods for queries are supported.

Author:
Ingo Bauersachs

Constructor Summary
UnboundResolver()
          Creates a new instance of this class.
 
Method Summary
 void addTrustAnchor(String anchor)
          Adds a DNSSEC trust anchor validation of the DNSKEYs.
 SecureMessage send(org.xbill.DNS.Message query)
          
 net.java.sip.communicator.util.dns.UnboundResolver.CallbackData sendAsync(org.xbill.DNS.Message query, org.xbill.DNS.ResolverListener listener)
           
 void setEDNS(int level)
          Not supported.
 void setEDNS(int level, int payloadSize, int flags, List options)
          Not supported.
 void setForwarders(String[] forwarders)
          Sets a list of forwarders to use instead of the system default.
 void setIgnoreTruncation(boolean flag)
          Not supported.
 void setPort(int port)
          Not supported.
 void setTCP(boolean flag)
          Not supported.
 void setTimeout(int secs)
           
 void setTimeout(int secs, int msecs)
           
 void setTSIGKey(org.xbill.DNS.TSIG key)
          Not supported.
protected  void validateMessage(SecureMessage msg)
          Method to allow overriders to inspect the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnboundResolver

public UnboundResolver()
Creates a new instance of this class.

Method Detail

setForwarders

public void setForwarders(String[] forwarders)
Sets a list of forwarders to use instead of the system default.

Parameters:
forwarders - list of servers to use for our queries.

addTrustAnchor

public void addTrustAnchor(String anchor)
Adds a DNSSEC trust anchor validation of the DNSKEYs.

Parameters:
anchor - trust anchor in the form of "'zone' IN DS 'key tag' 'algorithm' 'digest type' 'digest'"

send

public SecureMessage send(org.xbill.DNS.Message query)
                   throws IOException

Specified by:
send in interface org.xbill.DNS.Resolver
Throws:
IOException

validateMessage

protected void validateMessage(SecureMessage msg)
                        throws DnssecRuntimeException
Method to allow overriders to inspect the message. This class' implementation does nothing.

Parameters:
msg - The message to inspect.
Throws:
DnssecRuntimeException - if the inspector does not want the code to continue normal processing of the answer.

sendAsync

public net.java.sip.communicator.util.dns.UnboundResolver.CallbackData sendAsync(org.xbill.DNS.Message query,
                                                                                 org.xbill.DNS.ResolverListener listener)
Specified by:
sendAsync in interface org.xbill.DNS.Resolver

setEDNS

public void setEDNS(int level)
Not supported.

Specified by:
setEDNS in interface org.xbill.DNS.Resolver
Throws:
UnsupportedOperationException

setEDNS

public void setEDNS(int level,
                    int payloadSize,
                    int flags,
                    List options)
Not supported.

Specified by:
setEDNS in interface org.xbill.DNS.Resolver
Throws:
UnsupportedOperationException

setIgnoreTruncation

public void setIgnoreTruncation(boolean flag)
Not supported.

Specified by:
setIgnoreTruncation in interface org.xbill.DNS.Resolver
Throws:
UnsupportedOperationException

setPort

public void setPort(int port)
Not supported.

Specified by:
setPort in interface org.xbill.DNS.Resolver
Throws:
UnsupportedOperationException

setTCP

public void setTCP(boolean flag)
Not supported.

Specified by:
setTCP in interface org.xbill.DNS.Resolver
Throws:
UnsupportedOperationException

setTSIGKey

public void setTSIGKey(org.xbill.DNS.TSIG key)
Not supported.

Specified by:
setTSIGKey in interface org.xbill.DNS.Resolver
Throws:
UnsupportedOperationException

setTimeout

public void setTimeout(int secs)
Specified by:
setTimeout in interface org.xbill.DNS.Resolver

setTimeout

public void setTimeout(int secs,
                       int msecs)
Specified by:
setTimeout in interface org.xbill.DNS.Resolver

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.