org.opennms.core.test.dns
Class DNSServer

java.lang.Object
  extended by org.opennms.core.test.dns.DNSServer

public class DNSServer
extends Object


Constructor Summary
DNSServer()
           
DNSServer(String conffile)
           
 
Method Summary
 void addAddress(InetAddress address)
           
 void addPort(int port)
           
 void addPrimaryZone(String zname, String zonefile)
           
 void addSecondaryZone(String zone, String remote)
           
 void addTSIG(String algstr, String namestr, String key)
           
 void addZone(org.xbill.DNS.Zone zone)
           
 byte[] errorMessage(org.xbill.DNS.Message query, int rcode)
           
 org.xbill.DNS.Zone findBestZone(org.xbill.DNS.Name name)
           
 org.xbill.DNS.RRset findExactMatch(org.xbill.DNS.Name name, int type, int dclass, boolean glue)
           
 byte[] formerrMessage(byte[] in)
           
 org.xbill.DNS.Cache getCache(int dclass)
           
protected  void initializeDefaults()
           
protected  void parseConfiguration(String conffile)
           
 void setAddresses(List<InetAddress> addresses)
           
 void setPorts(List<Integer> ports)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DNSServer

public DNSServer(String conffile)
          throws IOException,
                 org.xbill.DNS.ZoneTransferException,
                 ConfigurationException
Throws:
IOException
org.xbill.DNS.ZoneTransferException
ConfigurationException

DNSServer

public DNSServer()
          throws UnknownHostException
Throws:
UnknownHostException
Method Detail

start

public void start()
           throws UnknownHostException
Throws:
UnknownHostException

stop

public void stop()

parseConfiguration

protected void parseConfiguration(String conffile)
                           throws ConfigurationException,
                                  IOException,
                                  org.xbill.DNS.ZoneTransferException,
                                  UnknownHostException
Throws:
ConfigurationException
IOException
org.xbill.DNS.ZoneTransferException
UnknownHostException

initializeDefaults

protected void initializeDefaults()
                           throws UnknownHostException
Throws:
UnknownHostException

addPort

public void addPort(int port)

setPorts

public void setPorts(List<Integer> ports)

addAddress

public void addAddress(InetAddress address)

setAddresses

public void setAddresses(List<InetAddress> addresses)

addZone

public void addZone(org.xbill.DNS.Zone zone)

addPrimaryZone

public void addPrimaryZone(String zname,
                           String zonefile)
                    throws IOException
Throws:
IOException

addSecondaryZone

public void addSecondaryZone(String zone,
                             String remote)
                      throws IOException,
                             org.xbill.DNS.ZoneTransferException
Throws:
IOException
org.xbill.DNS.ZoneTransferException

addTSIG

public void addTSIG(String algstr,
                    String namestr,
                    String key)
             throws IOException
Throws:
IOException

getCache

public org.xbill.DNS.Cache getCache(int dclass)

findBestZone

public org.xbill.DNS.Zone findBestZone(org.xbill.DNS.Name name)

findExactMatch

public org.xbill.DNS.RRset findExactMatch(org.xbill.DNS.Name name,
                                          int type,
                                          int dclass,
                                          boolean glue)

formerrMessage

public byte[] formerrMessage(byte[] in)

errorMessage

public byte[] errorMessage(org.xbill.DNS.Message query,
                           int rcode)


Copyright © 2011. All Rights Reserved.