public class

RMIRegistry

extends Object
java.lang.Object
   ↳ org.ops4j.pax.exam.container.def.internal.RMIRegistry

Class Overview

Graceful RMI registry creation/reuse. Tries to reuse an existing one but is fine with creating one on another port.

Summary

Public Constructors
RMIRegistry(Integer defaultPort, Integer alternativeRangeFrom, Integer alternativeRangeTo)
Public Methods
String getHost()
int getPort()
synchronized RMIRegistry selectGracefully()
This will make sure a registry exists and is valid m_port.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public RMIRegistry (Integer defaultPort, Integer alternativeRangeFrom, Integer alternativeRangeTo)

Public Methods

public String getHost ()

public int getPort ()

public synchronized RMIRegistry selectGracefully ()

This will make sure a registry exists and is valid m_port. If its not available or does not work for some reason, it will select another port. This should really not happen usually. But it can.

Returns
  • this for fluent API. Or IllegalStateException if a port has not been detected successfully.