equal
deleted
inserted
replaced
411 public static Registry createRegistryOnUnusedPort() throws RemoteException { |
411 public static Registry createRegistryOnUnusedPort() throws RemoteException { |
412 return LocateRegistry.createRegistry(getUnusedRandomPort()); |
412 return LocateRegistry.createRegistry(getUnusedRandomPort()); |
413 } |
413 } |
414 |
414 |
415 /** |
415 /** |
|
416 * Creates an RMI {@link Registry} on an ephemeral port. |
|
417 * |
|
418 * @returns an RMI Registry |
|
419 * @throws RemoteException if there was a problem creating a Registry. |
|
420 */ |
|
421 public static Registry createRegistryOnEphemeralPort() throws RemoteException { |
|
422 return LocateRegistry.createRegistry(0); |
|
423 } |
|
424 |
|
425 /** |
416 * Returns the port number the RMI {@link Registry} is running on. |
426 * Returns the port number the RMI {@link Registry} is running on. |
417 * |
427 * |
418 * @param registry the registry to find the port of. |
428 * @param registry the registry to find the port of. |
419 * @return the port number the registry is using. |
429 * @return the port number the registry is using. |
420 * @throws RuntimeException if there was a problem getting the port number. |
430 * @throws RuntimeException if there was a problem getting the port number. |