com.lukasfeiler.ipconfig
Class NetworkInterfaceConfiguration

java.lang.Object
  extended bycom.lukasfeiler.ipconfig.NetworkInterfaceConfiguration

public class NetworkInterfaceConfiguration
extends java.lang.Object

A network interface configuration with IP address, netmask and default gateway.


Constructor Summary
NetworkInterfaceConfiguration(IPAddress ipAddress, Netmask netmask, IPAddress gateway)
          Constructor that takes the IP address, netmask and gateway as arguments.
NetworkInterfaceConfiguration(java.lang.String ipAddress, java.lang.String netmask, java.lang.String gateway)
          Constructor that takes the IP address, netmask and gateway in the dotted-quad notation as arguments.
 
Method Summary
static void main(java.lang.String[] args)
          Command line interface.
 void validate()
          Throws an IPConfigException if the configuration is invalid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkInterfaceConfiguration

public NetworkInterfaceConfiguration(IPAddress ipAddress,
                                     Netmask netmask,
                                     IPAddress gateway)
Constructor that takes the IP address, netmask and gateway as arguments.


NetworkInterfaceConfiguration

public NetworkInterfaceConfiguration(java.lang.String ipAddress,
                                     java.lang.String netmask,
                                     java.lang.String gateway)
                              throws InvalidIntOctetException,
                                     com.lukasfeiler.ipconfig.IPException,
                                     IPConfigException
Constructor that takes the IP address, netmask and gateway in the dotted-quad notation as arguments.

Method Detail

validate

public void validate()
              throws IPConfigException
Throws an IPConfigException if the configuration is invalid.

Throws:
IPConfigException

main

public static void main(java.lang.String[] args)
Command line interface. The user will be prompted for IP address, netmask and default gateway (in dotted-quad notation).