com.eurotech.framework.net.route
Class RouteConfigIP<T extends IPAddress>

java.lang.Object
  extended by com.eurotech.framework.net.route.RouteConfigIP<T>
Type Parameters:
T -
All Implemented Interfaces:
NetConfig, RouteConfig
Direct Known Subclasses:
RouteConfigIP4, RouteConfigIP6

public abstract class RouteConfigIP<T extends IPAddress>
extends Object
implements RouteConfig

Base class for Route configurations


Constructor Summary
RouteConfigIP(T destination, T gateway, T netmask, String interfaceName, int metric)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getDescription()
          Gets the description of the route
 T getDestination()
          Gets the destination of the route
 T getGateway()
          Gets the gateway of the route
 String getInterfaceName()
          Gets the interface name associated with the route
 int getMetric()
          Gets the metric of the route
 T getNetmask()
          Gets the network mask of the route
 int hashCode()
           
 boolean isValid()
          Checks whether or not this configuration is valid.
 void setDestination(T destination)
           
 void setGateway(T gateway)
           
 void setInterfaceName(String interfaceName)
           
 void setMetric(int metric)
           
 void setNetmask(T netmask)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.eurotech.framework.net.route.RouteConfig
equals
 

Constructor Detail

RouteConfigIP

public RouteConfigIP(T destination,
                     T gateway,
                     T netmask,
                     String interfaceName,
                     int metric)
Method Detail

getDescription

public String getDescription()
Description copied from interface: RouteConfig
Gets the description of the route

Specified by:
getDescription in interface RouteConfig
Returns:
The description of the route

getDestination

public T getDestination()
Description copied from interface: RouteConfig
Gets the destination of the route

Specified by:
getDestination in interface RouteConfig
Returns:
The destination of the route

setDestination

public void setDestination(T destination)

getGateway

public T getGateway()
Description copied from interface: RouteConfig
Gets the gateway of the route

Specified by:
getGateway in interface RouteConfig
Returns:
The gateway of the route

setGateway

public void setGateway(T gateway)

getNetmask

public T getNetmask()
Description copied from interface: RouteConfig
Gets the network mask of the route

Specified by:
getNetmask in interface RouteConfig
Returns:
The network mask of the route

setNetmask

public void setNetmask(T netmask)

getInterfaceName

public String getInterfaceName()
Description copied from interface: RouteConfig
Gets the interface name associated with the route

Specified by:
getInterfaceName in interface RouteConfig
Returns:
The interface name associated with the route

setInterfaceName

public void setInterfaceName(String interfaceName)

getMetric

public int getMetric()
Description copied from interface: RouteConfig
Gets the metric of the route

Specified by:
getMetric in interface RouteConfig
Returns:
The metric of the route

setMetric

public void setMetric(int metric)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

isValid

public boolean isValid()
Description copied from interface: NetConfig
Checks whether or not this configuration is valid.

Specified by:
isValid in interface NetConfig
Returns:
true if the configuration is valid, otherwise false

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.