Rice Pastry API

rice.pastry.socket.nat
Class StubNATHandler

java.lang.Object
  extended by rice.pastry.socket.nat.StubNATHandler
All Implemented Interfaces:
NATHandler

public class StubNATHandler
extends java.lang.Object
implements NATHandler


Constructor Summary
StubNATHandler(Environment environment, java.net.InetAddress address)
           
 
Method Summary
 int findAvailableFireWallPort(int internal, int external, int tries, java.lang.String appName)
          Search for an available port forwarding, starting with the external address specified.
 java.net.InetAddress findFireWall(java.net.InetAddress bindAddress)
          Search for the firewall on the NIC specified by the bindAddress
 java.net.InetAddress getFireWallExternalAddress()
          The neame of the firewall's external address.
 void openFireWallPort(int local, int external, java.lang.String appName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StubNATHandler

public StubNATHandler(Environment environment,
                      java.net.InetAddress address)
Method Detail

getFireWallExternalAddress

public java.net.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 java.net.InetAddress findFireWall(java.net.InetAddress bindAddress)
                                  throws java.io.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:
java.io.IOException

findAvailableFireWallPort

public int findAvailableFireWallPort(int internal,
                                     int external,
                                     int tries,
                                     java.lang.String appName)
                              throws java.io.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:
java.io.IOException

openFireWallPort

public void openFireWallPort(int local,
                             int external,
                             java.lang.String appName)
                      throws java.io.IOException
Specified by:
openFireWallPort in interface NATHandler
Throws:
java.io.IOException

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection