com.eurotech.framework.net.dns
Class DnsServerConfigIP<T extends IPAddress>

java.lang.Object
  extended by com.eurotech.framework.net.dns.DnsServerConfigIP<T>
Type Parameters:
T -
All Implemented Interfaces:
DnsServerConfig, NetConfig
Direct Known Subclasses:
DnsServerConfigIP4, DnsServerConfigIP6

public abstract class DnsServerConfigIP<T extends IPAddress>
extends Object
implements DnsServerConfig

Base class for DNS proxy configurations

Author:
eurotech

Constructor Summary
DnsServerConfigIP(List<T> forwarders, List<NetworkPair<T>> allowedNetworks)
          Creates a DNS configuration with a default set of forwarders and a set of allowed networks
 
Method Summary
 List<NetworkPair<T>> getAllowedNetworks()
          Gets a List of networks that are allowed to make DNS queries
 List<T> getForwarders()
          Gets the current recursive domain name servers to use to resolve queries
 void setAllowedNetworks(List<NetworkPair<T>> allowedNetworks)
          Sets a List of networks that are allowed to make DNS queries
 void setForwarders(List<T> forwarders)
          Sets the current recursive domain name servers to use to resolve queries
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.eurotech.framework.net.NetConfig
isValid
 

Constructor Detail

DnsServerConfigIP

public DnsServerConfigIP(List<T> forwarders,
                         List<NetworkPair<T>> allowedNetworks)
Creates a DNS configuration with a default set of forwarders and a set of allowed networks

Parameters:
forwarders - The recursive DNS servers to use
allowedNetworks - The LAN networks that are allowed to make queries
Method Detail

getForwarders

public List<T> getForwarders()
Gets the current recursive domain name servers to use to resolve queries

Specified by:
getForwarders in interface DnsServerConfig
Returns:
a List of DNS forwarders

setForwarders

public void setForwarders(List<T> forwarders)
Sets the current recursive domain name servers to use to resolve queries

Parameters:
forwarders - The recursive DNS servers to use

getAllowedNetworks

public List<NetworkPair<T>> getAllowedNetworks()
Gets a List of networks that are allowed to make DNS queries

Specified by:
getAllowedNetworks in interface DnsServerConfig
Returns:
a List of NetworkPair representing the networks that are allowed to perform DNS queries

setAllowedNetworks

public void setAllowedNetworks(List<NetworkPair<T>> allowedNetworks)
Sets a List of networks that are allowed to make DNS queries

Parameters:
allowedNetworks - The LAN networks that are allowed to make queries

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.