com.eurotech.framework.net.firewall
Class FirewallNatConfig

java.lang.Object
  extended by com.eurotech.framework.net.firewall.FirewallNatConfig
All Implemented Interfaces:
NetConfig

public class FirewallNatConfig
extends Object
implements NetConfig

Represents a NAT configuration

Author:
eurotech

Constructor Summary
FirewallNatConfig()
          Creates a null NAT configuration
FirewallNatConfig(String sourceInterface, String destinationInterface, boolean masquerade)
          Creates a complete NAT configuration
 
Method Summary
 boolean equals(Object obj)
           
 String getDestinationInterface()
           
 String getSourceInterface()
           
 int hashCode()
           
 boolean isMasquerade()
           
 boolean isValid()
          Checks whether or not this configuration is valid.
 void setDestinationInterface(String destinationInterface)
           
 void setMasquerade(boolean masquerade)
           
 void setSourceInterface(String sourceInterface)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FirewallNatConfig

public FirewallNatConfig()
Creates a null NAT configuration


FirewallNatConfig

public FirewallNatConfig(String sourceInterface,
                         String destinationInterface,
                         boolean masquerade)
Creates a complete NAT configuration

Parameters:
sourceInterface - The source interface (LAN interface) for the NAT configuration
destinationInterface - The destination interface (WAN interface) for the NAT configuration
masquerade - Whether or not MASQUERADE should be enabled
Method Detail

getSourceInterface

public String getSourceInterface()

setSourceInterface

public void setSourceInterface(String sourceInterface)

getDestinationInterface

public String getDestinationInterface()

setDestinationInterface

public void setDestinationInterface(String destinationInterface)

isMasquerade

public boolean isMasquerade()

setMasquerade

public void setMasquerade(boolean masquerade)

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.