org.eu.mayrhofer.apps
Class IPSecConfigHandler

java.lang.Object
  extended by org.eu.mayrhofer.apps.IPSecConfigHandler

public class IPSecConfigHandler
extends java.lang.Object

This class implements reading and writing of the configuration of an IPSec tunnel in XML format.

Version:
1.0
Author:
Rene Mayrhofer

Constructor Summary
IPSecConfigHandler()
          This constructor actually does nothing.
 
Method Summary
 java.lang.String getCaDistinguishedName()
          Returns the value to be used for the CA distinguished name.
 java.lang.String getGateway()
          Returns the value to be used for the remote gateway of the IPSec tunnel.
 int getRemoteNetmask()
          Returns the value to be used for the netmask of the remote network behind the remote gateway of the IPSec tunnel.
 java.lang.String getRemoteNetwork()
          Returns the value to be used for the remote network behind the remote gateway of the IPSec tunnel.
 boolean parseConfig(java.io.Reader input)
          Parses an existing configuration and extracts the gateway and optionally the remote remote network (if it exists in the configuration).
 void setCaDistinguishedName(java.lang.String caDistinguishedName)
          Sets the value to be used for the CA distinguished name.
 void setGateway(java.lang.String gateway)
          Sets the value to be used for the remote gateway of the IPSec tunnel.
 void setRemoteNetmask(int remoteNetmask)
          Sets the value to be used for the remote network behind the remote gateway of the IPSec tunnel.
 void setRemoteNetwork(java.lang.String remoteNetwork)
          Sets the value to be used for the remote network behind the remote gateway of the IPSec tunnel.
 boolean writeConfig(java.io.Writer output)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IPSecConfigHandler

public IPSecConfigHandler()
This constructor actually does nothing.

Method Detail

getGateway

public java.lang.String getGateway()
Returns the value to be used for the remote gateway of the IPSec tunnel.


setGateway

public void setGateway(java.lang.String gateway)
Sets the value to be used for the remote gateway of the IPSec tunnel.


getRemoteNetwork

public java.lang.String getRemoteNetwork()
Returns the value to be used for the remote network behind the remote gateway of the IPSec tunnel.


setRemoteNetwork

public void setRemoteNetwork(java.lang.String remoteNetwork)
Sets the value to be used for the remote network behind the remote gateway of the IPSec tunnel.


getRemoteNetmask

public int getRemoteNetmask()
Returns the value to be used for the netmask of the remote network behind the remote gateway of the IPSec tunnel.


setRemoteNetmask

public void setRemoteNetmask(int remoteNetmask)
Sets the value to be used for the remote network behind the remote gateway of the IPSec tunnel.


getCaDistinguishedName

public java.lang.String getCaDistinguishedName()
Returns the value to be used for the CA distinguished name.


setCaDistinguishedName

public void setCaDistinguishedName(java.lang.String caDistinguishedName)
Sets the value to be used for the CA distinguished name.


parseConfig

public boolean parseConfig(java.io.Reader input)
Parses an existing configuration and extracts the gateway and optionally the remote remote network (if it exists in the configuration).

Parameters:
input - The configuration.
Returns:
true if the configuration could be read and parsed correctly, false otherwise.

writeConfig

public boolean writeConfig(java.io.Writer output)


2005-2006, Rene Mayrhofer.