jondo.demo
Class SimpleConfiguration

java.lang.Object
  extended by jondo.demo.SimpleConfiguration
All Implemented Interfaces:
IConfiguration
Direct Known Subclasses:
SimpleForwarderConfiguration

public class SimpleConfiguration
extends java.lang.Object
implements IConfiguration


Constructor Summary
SimpleConfiguration()
           
SimpleConfiguration(java.net.InetAddress a_host, int a_port)
           
SimpleConfiguration(java.lang.String a_host, int a_port)
           
 
Method Summary
 java.lang.String getApplicationName()
           
 ICachingDatabase getDatabaseInterface()
          Optional: a database interface for caching the database entries.
 IAntiCensorshipForwarding getForwardingSettings()
           
 java.net.InetAddress getListenHost()
          Returns the listener host name or null if the application should listen on all host names.
 int getListenPort()
          Returns a valid listen port.
 AbstractPasswordReader getPasswordReader()
           
 SimpleProxyInterface getProxyInterface()
          Returns a proxy interface or null if no proxy is used.
 org.w3c.dom.Element read()
          Returns the configuration content as String.
 void write(org.w3c.dom.Element a_doc)
          Writes the configuration.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleConfiguration

public SimpleConfiguration()
                    throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

SimpleConfiguration

public SimpleConfiguration(java.lang.String a_host,
                           int a_port)
                    throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

SimpleConfiguration

public SimpleConfiguration(java.net.InetAddress a_host,
                           int a_port)
Method Detail

read

public org.w3c.dom.Element read()
                         throws java.lang.Exception
Description copied from interface: IConfiguration
Returns the configuration content as String.

Specified by:
read in interface IConfiguration
Returns:
the configuration content as String or null if the configuration is empty or does not exist
Throws:
java.lang.Exception - if an error occurs while reading the configuration to a String

write

public void write(org.w3c.dom.Element a_doc)
           throws java.lang.Exception
Description copied from interface: IConfiguration
Writes the configuration.

Specified by:
write in interface IConfiguration
Throws:
java.lang.Exception

getDatabaseInterface

public ICachingDatabase getDatabaseInterface()
Description copied from interface: IConfiguration
Optional: a database interface for caching the database entries. Leads to a faster startup. May be null.

Specified by:
getDatabaseInterface in interface IConfiguration
Returns:

getListenPort

public int getListenPort()
Description copied from interface: IConfiguration
Returns a valid listen port.

Specified by:
getListenPort in interface IConfiguration
Returns:
a valid listen port

getListenHost

public java.net.InetAddress getListenHost()
Description copied from interface: IConfiguration
Returns the listener host name or null if the application should listen on all host names.

Specified by:
getListenHost in interface IConfiguration
Returns:
the listener host name or null if the application should listen on all host names

getPasswordReader

public AbstractPasswordReader getPasswordReader()
Specified by:
getPasswordReader in interface IConfiguration

getProxyInterface

public SimpleProxyInterface getProxyInterface()
Description copied from interface: IConfiguration
Returns a proxy interface or null if no proxy is used. Typically, such a proxy configuration is only needed on user desktop environments, but not for server applications.

Specified by:
getProxyInterface in interface IConfiguration
Returns:

getApplicationName

public java.lang.String getApplicationName()
Specified by:
getApplicationName in interface IConfiguration

getForwardingSettings

public IAntiCensorshipForwarding getForwardingSettings()
Specified by:
getForwardingSettings in interface IConfiguration