rice.pastry.socket.nat
Class StubNATHandler
java.lang.Object
rice.pastry.socket.nat.StubNATHandler
- All Implemented Interfaces:
- NATHandler
public class StubNATHandler
- extends Object
- implements NATHandler
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StubNATHandler
public StubNATHandler(Environment environment,
InetAddress address)
getFireWallExternalAddress
public InetAddress getFireWallExternalAddress()
- Description copied from interface:
NATHandler
- The neame of the firewall's external address. null if there is no firewall.
- Specified by:
getFireWallExternalAddress in interface NATHandler
- Returns:
findFireWall
public InetAddress findFireWall(InetAddress bindAddress)
throws IOException
- Description copied from interface:
NATHandler
- Search for the firewall on the NIC specified by the bindAddress
- Specified by:
findFireWall in interface NATHandler
- Parameters:
bindAddress - the network to find the firewall on
- Returns:
-
- Throws:
IOException
findAvailableFireWallPort
public int findAvailableFireWallPort(int internal,
int external,
int tries,
String appName)
throws IOException
- Description copied from interface:
NATHandler
- Search for an available port forwarding, starting with the external address specified. The internal
one is given so you can detect that the rule was already in place.
- Specified by:
findAvailableFireWallPort in interface NATHandler
- Returns:
-
- Throws:
IOException
openFireWallPort
public void openFireWallPort(int local,
int external,
String appName)
throws IOException
- Specified by:
openFireWallPort in interface NATHandler
- Throws:
IOException
Copyright © 2010. All Rights Reserved.