com.eurotech.framework.net.firewall
Class FirewallOpenPortConfigIP<T extends IPAddress>

java.lang.Object
  extended by com.eurotech.framework.net.firewall.FirewallOpenPortConfigIP<T>
Type Parameters:
T -
All Implemented Interfaces:
FirewallOpenPortConfig, NetConfig
Direct Known Subclasses:
FirewallOpenPortConfigIP4

public abstract class FirewallOpenPortConfigIP<T extends IPAddress>
extends Object
implements FirewallOpenPortConfig

The base class for firewall open port configurations

Author:
eurotech

Constructor Summary
FirewallOpenPortConfigIP()
          Creates and empty open port configuration
FirewallOpenPortConfigIP(int port, NetProtocol protocol, NetworkPair<T> permittedNetwork, String permittedInterfaceName, String unpermittedInterfaceName, String permittedMac, String sourcePortRange)
          Creates a complete Open Port configuration
 
Method Summary
 boolean equals(Object obj)
           
 String getPermittedInterfaceName()
           
 String getPermittedMac()
          Gets the (optional) permitted MAC address that is allowed to make inbound connections
 NetworkPair<T> getPermittedNetwork()
          Gets the (optional) permitted remote network that can make inbound connections
 int getPort()
          Gets the port that is open for inbound connections
 NetProtocol getProtocol()
          Gets the type of network protocol (TCP or UDP) that is open for inbound connections
 String getSourcePortRange()
          Gets the (optional) permitted source port range that is allowed to make inbound connections
 String getUnpermittedInterfaceName()
           
 int hashCode()
           
 boolean isValid()
          Checks whether or not this configuration is valid.
 void setPermittedInterfaceName(String permittedInterfaceName)
           
 void setPermittedMac(String permittedMac)
           
 void setPermittedNetwork(NetworkPair<T> permittedNetwork)
           
 void setPort(int port)
           
 void setProtocol(NetProtocol protocol)
           
 void setSourcePortRange(String sourcePortRange)
           
 void setUnpermittedInterfaceName(String unpermittedInterfaceName)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FirewallOpenPortConfigIP

public FirewallOpenPortConfigIP()
Creates and empty open port configuration


FirewallOpenPortConfigIP

public FirewallOpenPortConfigIP(int port,
                                NetProtocol protocol,
                                NetworkPair<T> permittedNetwork,
                                String permittedInterfaceName,
                                String unpermittedInterfaceName,
                                String permittedMac,
                                String sourcePortRange)
Creates a complete Open Port configuration

Parameters:
port - The port to open for inbound connections
protocol - The type of protocol to allow for inbound connections
permittedNetwork - The (optional) permitted network for inbound connections
permittedInterfaceName - The (optional) permitted interface name for inbound connections
unpermittedInterfaceName - The (optional) not permitted interface name for inbound connections
permittedMac - The (optional) permitted MAC address for inbound connections
sourcePortRange - The (options) permitted source port range for inbound connections
Method Detail

getPort

public int getPort()
Description copied from interface: FirewallOpenPortConfig
Gets the port that is open for inbound connections

Specified by:
getPort in interface FirewallOpenPortConfig
Returns:
The port number representing the inbound network port

setPort

public void setPort(int port)

getProtocol

public NetProtocol getProtocol()
Description copied from interface: FirewallOpenPortConfig
Gets the type of network protocol (TCP or UDP) that is open for inbound connections

Specified by:
getProtocol in interface FirewallOpenPortConfig
Returns:
The NetProtocol type associated with this interface

setProtocol

public void setProtocol(NetProtocol protocol)

getPermittedNetwork

public NetworkPair<T> getPermittedNetwork()
Description copied from interface: FirewallOpenPortConfig
Gets the (optional) permitted remote network that can make inbound connections

Specified by:
getPermittedNetwork in interface FirewallOpenPortConfig
Returns:
The NetworkPair representing the permitted network

setPermittedNetwork

public void setPermittedNetwork(NetworkPair<T> permittedNetwork)

getPermittedInterfaceName

public String getPermittedInterfaceName()

setPermittedInterfaceName

public void setPermittedInterfaceName(String permittedInterfaceName)

getUnpermittedInterfaceName

public String getUnpermittedInterfaceName()

setUnpermittedInterfaceName

public void setUnpermittedInterfaceName(String unpermittedInterfaceName)

getPermittedMac

public String getPermittedMac()
Description copied from interface: FirewallOpenPortConfig
Gets the (optional) permitted MAC address that is allowed to make inbound connections

Specified by:
getPermittedMac in interface FirewallOpenPortConfig
Returns:
The MAC address that is allowed to make inbound connections

setPermittedMac

public void setPermittedMac(String permittedMac)

getSourcePortRange

public String getSourcePortRange()
Description copied from interface: FirewallOpenPortConfig
Gets the (optional) permitted source port range that is allowed to make inbound connections

Specified by:
getSourcePortRange in interface FirewallOpenPortConfig
Returns:
The source port range that is allowed to make inbound connections

setSourcePortRange

public void setSourcePortRange(String sourcePortRange)

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.