com.esf.net.dnsproxy.service
Interface IDnsProxyService


public interface IDnsProxyService

Defines DNS-proxy service. DNS proxy takes DNS queries from a local client device, forwards the request to a public DNS server, and returns the resolved address to the client.

Author:
ilya.binshtok

Field Summary
static java.lang.String SERVICE_NAME
          service name of this interface for the bundle activator (com.esf.networking.dnsproxy.service.IDnsProxyService)
 
Method Summary
 boolean configFileDoesExist(int persistence)
          checks for the existence of DNS proxy configuration file
 java.lang.String getAuthoritative(int persistence)
          gets the currently defined authoritative DNS server
 int getAuthoritativePort(int persistence)
          gets the currently defined authoritative DNS server port number
 int getAuthoritativeTimeout(int persistence)
          gets the authoritative DNS server timeout
 java.util.ArrayList getInternalNetworks(int persistence)
          gets the current list of networks on which dnsproxy will perform DNS queries
 java.lang.String getListen(int persistence)
          gets the IP address on which dnsproxy is configured to listen on
 int getListenPort(int persistence)
          gets the port number on which dnsproxy listens
 java.lang.String getRecursive(int persistence)
          gets the currently defined DNS server IP address
 int getRecursivePort(int persistence)
          gets the current recursive DNS server port number
 int getRecursiveTimeout(int persistence)
          gets the recursive DNS server timeout
 java.util.ArrayList getSecurityFeatures(int persistence)
          gets the list of currently defined dnsproxy security features
 void initialize(int persistence)
           
 void initialize(java.lang.String authoritative, int authoritativePort, int authoritativeTout, java.lang.String recursive, int recursivePort, int recursiveTout, java.lang.String listen, int listenPort, java.util.ArrayList securityFeatures, java.util.ArrayList internalNetworks, int persistence)
           
 void setAuthoritative(java.lang.String authoritative, int persistence)
          sets the authoritative DNS server
 void setAuthoritativePort(int authoritativePort, int persistence)
          sets the authoritative DNS server port number
 void setAuthoritativeTimeout(int authoritativeTimeout, int persistence)
          sets the authoritative DNS server timeout
 void setInternalNetwork(java.lang.String internalNetwork, int persistence)
          Sets 'internal network' entry in appropriate configuration file
 void setListen(java.lang.String listen, int persistence)
          sets the IP address on which dnsproxy is configured to listen
 void setListenPort(int listenPort, int persistence)
          sets the port number on which dnsproxy listens
 void setRecursive(java.lang.String recursive, int persistence)
          sets the recursive DNS server
 void setRecursivePort(int recursivePort, int persistence)
          sets the recursive DNS server port number
 void setRecursiveTimeout(int recursiveTimeout, int persistence)
          sets the recursive DNS server timeout
 void setSecurityFeature(DnsProxySecurityFeature securityFeature, int persistence)
          Sets 'security feature' in appropriate configuration file
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
service name of this interface for the bundle activator (com.esf.networking.dnsproxy.service.IDnsProxyService)

Method Detail

initialize

public void initialize(int persistence)
                throws java.lang.Exception
Parameters:
persistence - as int
Throws:
java.lang.Exception - if unable to initialize

initialize

public void initialize(java.lang.String authoritative,
                       int authoritativePort,
                       int authoritativeTout,
                       java.lang.String recursive,
                       int recursivePort,
                       int recursiveTout,
                       java.lang.String listen,
                       int listenPort,
                       java.util.ArrayList securityFeatures,
                       java.util.ArrayList internalNetworks,
                       int persistence)
                throws java.lang.Exception
Parameters:
authoritative - authoritative IP address to use for DNS
authoritativePort - IP port of authoritative DNS server
authoritativeTout - timeout to wait for DNS responses from authoritative server
recursive - recursive IP address to use for DNS
recursivePort - IP port of recursive DNS server
recursiveTout - timeout to wait for DNS responses from recursive server
listen - IP address on which dnsproxy is to listen
listenPort - port number of listen IP
securityFeatures - list of DNS security features
internalNetworks - internal networks on which to listen for DNS
persistence - type of persistence for configuration
Throws:
java.lang.Exception

setSecurityFeature

public void setSecurityFeature(DnsProxySecurityFeature securityFeature,
                               int persistence)
                        throws java.lang.Exception
Sets 'security feature' in appropriate configuration file

Parameters:
securityFeature - as DnsProxySecurityFeature
persistence - as int
Throws:
java.lang.Exception

setInternalNetwork

public void setInternalNetwork(java.lang.String internalNetwork,
                               int persistence)
                        throws java.lang.Exception
Sets 'internal network' entry in appropriate configuration file

Parameters:
internalNetwork - IP network on which to listen for DNS
persistence - sets the configuration for the given persistence type, as defined in Persistence
Throws:
java.lang.Exception

configFileDoesExist

public boolean configFileDoesExist(int persistence)
                            throws java.lang.Exception
checks for the existence of DNS proxy configuration file

Parameters:
persistence - gets the configuration for the given persistence type, as defined in Persistence
Returns:
true if configuration file exists; false otherwise
Throws:
java.lang.Exception

getAuthoritative

public java.lang.String getAuthoritative(int persistence)
                                  throws java.lang.Exception
gets the currently defined authoritative DNS server

Parameters:
persistence - as gets the configuration for the given persistence type, as defined in Persistence
Returns:
IP address of the current authoritative DNS server as String
Throws:
java.lang.Exception

setAuthoritative

public void setAuthoritative(java.lang.String authoritative,
                             int persistence)
                      throws java.lang.Exception
sets the authoritative DNS server

Parameters:
authoritative - IP address of the new authoritative DNS server to use as String
persistence - sets the configuration for the given persistence type, as defined in Persistence
Throws:
java.lang.Exception

getAuthoritativePort

public int getAuthoritativePort(int persistence)
                         throws java.lang.Exception
gets the currently defined authoritative DNS server port number

Parameters:
persistence - gets the configuration for the given persistence type, as defined in Persistence
Returns:
the port number of the authoritative DNS server
Throws:
java.lang.Exception

setAuthoritativePort

public void setAuthoritativePort(int authoritativePort,
                                 int persistence)
                          throws java.lang.Exception
sets the authoritative DNS server port number

Parameters:
authoritativePort - the port number of the authoritative DNS server
persistence - sets the configuration for the given persistence type, as defined in Persistence
Throws:
java.lang.Exception

getAuthoritativeTimeout

public int getAuthoritativeTimeout(int persistence)
                            throws java.lang.Exception
gets the authoritative DNS server timeout

Parameters:
persistence - gets the configuration for the given persistence type, as defined in Persistence
Returns:
the authoritative DNS server timeout
Throws:
java.lang.Exception

setAuthoritativeTimeout

public void setAuthoritativeTimeout(int authoritativeTimeout,
                                    int persistence)
                             throws java.lang.Exception
sets the authoritative DNS server timeout

Parameters:
authoritativeTimeout - the authoritative DNS server timeout
persistence - sets the configuration for the given persistence type, as defined in Persistence
Throws:
java.lang.Exception

getListen

public java.lang.String getListen(int persistence)
                           throws java.lang.Exception
gets the IP address on which dnsproxy is configured to listen on

Parameters:
persistence - gets the configuration for the given persistence type, as defined in Persistence
Returns:
IP address on which dnsproxy is set to listen on, as String
Throws:
java.lang.Exception

setListen

public void setListen(java.lang.String listen,
                      int persistence)
               throws java.lang.Exception
sets the IP address on which dnsproxy is configured to listen

Parameters:
listen - IP address on which dnsproxy is set to listen, as String
persistence - sets the configuration for the given persistence type, as defined in Persistence
Throws:
java.lang.Exception

getListenPort

public int getListenPort(int persistence)
                  throws java.lang.Exception
gets the port number on which dnsproxy listens

Parameters:
persistence - gets the configuration for the given persistence type, as defined in Persistence
Returns:
the port number on which dnsproxy listens
Throws:
java.lang.Exception

setListenPort

public void setListenPort(int listenPort,
                          int persistence)
                   throws java.lang.Exception
sets the port number on which dnsproxy listens

Parameters:
listenPort - the port number on which dnsproxy listens
persistence - sets the configuration for the given persistence type, as defined in Persistence
Throws:
java.lang.Exception

setRecursive

public void setRecursive(java.lang.String recursive,
                         int persistence)
                  throws java.lang.Exception
sets the recursive DNS server

Parameters:
recursive - recursive DNS server IP address, as String
persistence - sets the configuration for the given persistence type, as defined in Persistence
Throws:
java.lang.Exception

getRecursive

public java.lang.String getRecursive(int persistence)
                              throws java.lang.Exception
gets the currently defined DNS server IP address

Parameters:
persistence - gets the configuration for the given persistence type, as defined in Persistence
Returns:
DNS server IP address as String
Throws:
java.lang.Exception

getRecursivePort

public int getRecursivePort(int persistence)
                     throws java.lang.Exception
gets the current recursive DNS server port number

Parameters:
persistence - gets the configuration for the given persistence type, as defined in Persistence
Returns:
DNS server port number
Throws:
java.lang.Exception

setRecursivePort

public void setRecursivePort(int recursivePort,
                             int persistence)
                      throws java.lang.Exception
sets the recursive DNS server port number

Parameters:
recursivePort - the current recursive DNS server port number
persistence - sets the configuration for the given persistence type, as defined in Persistence
Throws:
java.lang.Exception

getRecursiveTimeout

public int getRecursiveTimeout(int persistence)
                        throws java.lang.Exception
gets the recursive DNS server timeout

Parameters:
persistence - gets the configuration for the given persistence type, as defined in Persistence
Returns:
the recursive DNS server timeout
Throws:
java.lang.Exception

setRecursiveTimeout

public void setRecursiveTimeout(int recursiveTimeout,
                                int persistence)
                         throws java.lang.Exception
sets the recursive DNS server timeout

Parameters:
recursiveTimeout - the recursive DNS server timeout
persistence - sets the configuration for the given persistence type, as defined in Persistence
Throws:
java.lang.Exception

getSecurityFeatures

public java.util.ArrayList getSecurityFeatures(int persistence)
                                        throws java.lang.Exception
gets the list of currently defined dnsproxy security features

Parameters:
persistence - gets the configuration for the given persistence type, as defined in Persistence
Returns:
ArrayList of String variables representing the currently defined security features
Throws:
java.lang.Exception

getInternalNetworks

public java.util.ArrayList getInternalNetworks(int persistence)
                                        throws java.lang.Exception
gets the current list of networks on which dnsproxy will perform DNS queries

Parameters:
persistence - gets the configuration for the given persistence type, as defined in Persistence
Returns:
an ArrayList of String variables representing the networks on which dnsproxy will perform queries for
Throws:
java.lang.Exception


Copyright © 2009 Eurotech Inc. All rights reserved.