public static ProcessRegistry locateRegistry(int port) throws RegistryException {
  try {
    Registry registry=LocateRegistry.getRegistry(port);
    ProcessRegistry processRegistry=new ProcessRegistry(port,registry);
    return processRegistry;
  }
 catch (  RemoteException e) {
    throw new RegistryException("Failed to locate registry on port [" + port + "]",e);
  }
}

public static ProcessRegistry locateRegistry ( int port ) throws RegistryException { try { Registry registry = LocateRegistry . getRegistry ( port ) ; ProcessRegistry processRegistry = new ProcessRegistry ( port , registry ) ; return processRegistry ; } catch ( RemoteException e ) { throw new RegistryException ( "Failed to locate registry on port [" + port + "]" , e ) ; } }
returns a reference to the the remote object registry for the local host on the specified port .
