Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jini.rio.boot
Class RegistryUtil

    java.lang.Object
      org.jini.rio.boot.RegistryUtil

    public class RegistryUtil

extends Object

Checks to see if the RMI Registry is running by checking if the `org.jini.rio.registryPort` system property is set. If the `org.jini.rio.registryPort` system property is not set, it will create a RMI Registry and set the `org.jini.rio.registryPort` system property.

#### Configuration

The RegistryUtil class supports the following configuration entries; where each configuration entry name is associated with the component name `org.jini.rio.boot`.

- registryPort

  Type: | int
  Default: | 1099
  Description: | The port to use when creating the RMI Registry. This entry will be read at initialization, and based on the value provided by the registryRetries property, will be incremented

``

- registryRetries

  Type: | int
  Default: | 50
  Description: | This entry will be read at initialization and provides the ability to recover from RMI Registry creation failure by incrementing the port the RMI Registry instance will accept requests on. The port provided by the registryPort property is used as a basis to increment from. If retries are needed, the registryPort is incremented by one each time until either the RMI Registry is created without exceptions, or the registry retries have been exhausted

Field Summary
`static int` | `DEFAULT_PORT`
`static int` | `DEFAULT_RETRY_COUNT`

Constructor Summary
`RegistryUtil()`

Method Summary
`static void` | `checkRegistry(Configuration config)` Check if RMI Registry has been started for the VM, if not start it.
`static int` | `getRegistryRetries(Configuration config)` Get the registryRetries property.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_PORT

    public static final int DEFAULT_PORT

See Also:
  Constant Field Values

### DEFAULT_RETRY_COUNT

    public static final int DEFAULT_RETRY_COUNT

See Also:
  Constant Field Values

Constructor Detail

### RegistryUtil

    public RegistryUtil()

Method Detail

### checkRegistry

    public static void checkRegistry(Configuration config)
                              throws ConfigurationException

  Check if RMI Registry has been started for the VM, if not start it.

  Parameters:
    `config` - Configuration object to use
  Throws:
    `ConfigurationException` - If there are errors reading the configuration

### getRegistryRetries

    public static int getRegistryRetries(Configuration config)

  Get the registryRetries property.

  Parameters:
    `config` - The Configuration to use, if null a default value is returned
  Returns:
    The number of times to attempt to find an RMI Registry instance

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Project Rio.