util.rmi
Class VpnRegistry

java.lang.Object
  extended by util.rmi.VpnRegistry

public class VpnRegistry
extends Object

Play around with vpn-registries.

The solution is to set the java.rmi.server.hostname to the IP address of vpn-archive, no custom factory needed. You can unset the server hostname after creation of registry.


Nested Class Summary
private static class VpnRegistry.RCSF
           
private static class VpnRegistry.RSSF
           
static class VpnRegistry.Server
           
static class VpnRegistry.Simple
          Class to test callback without special registries.
static class VpnRegistry.VpnC
          Class to test callback without special registries.
private static class VpnRegistry.VpnClient
           
static class VpnRegistry.VpnS
          Class to test callback without special registries.
private static class VpnRegistry.VpnServer
           
 
Field Summary
static VpnRegistry.RCSF rcsf
          A global reference to the remote client socket factory.
static VpnRegistry.RSSF rssf
          A global reference to the remote server socket factory.
 
Constructor Summary
VpnRegistry()
           
 
Method Summary
static void config(String serverHost, int serverPort, String clientHost, int clientPort)
           
static Registry createRegistry(int port)
          Create a registry on the specified port.
static Registry createVpnRegistry(int port, String chost, String shost)
          Create a registry on the specified port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rcsf

public static final VpnRegistry.RCSF rcsf
A global reference to the remote client socket factory. This is the factory remote VMs will use to communicate with local items.


rssf

public static final VpnRegistry.RSSF rssf
A global reference to the remote server socket factory. This is the factory the local items use to communicate with remote VMs.

Constructor Detail

VpnRegistry

public VpnRegistry()
Method Detail

createRegistry

public static Registry createRegistry(int port)
                               throws RemoteException
Create a registry on the specified port.

Throws:
RemoteException

createVpnRegistry

public static Registry createVpnRegistry(int port,
                                         String chost,
                                         String shost)
                                  throws Exception
Create a registry on the specified port.

Throws:
Exception

config

public static void config(String serverHost,
                          int serverPort,
                          String clientHost,
                          int clientPort)
                   throws UnknownHostException
Throws:
UnknownHostException