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.config
Class ExporterConfig

    java.lang.Object
      org.jini.rio.config.ExporterConfig

    public class ExporterConfig

extends Object

The ExporterConfig is a utility class used to get an `Exporter` instance from a `Configuration` defaulting to a special entry configured for the platform
`org.jini.rio.defaultExporter`

This allows deployers to configure one Exporter that all services (if service configurations declare) will use. Declaring that your Service will use the default Exporter is done as follows:
<Configuration>
<Component Name="org.jini.rio">
<Parameter
Name="defaultExporter"
Value="$org_jini_rio_defaultExporter"/>
</Component>
</Configuration>

Field Summary
`static String` | `DEFAULT_COMPONENT`
`static String` | `ENTRY_NAME`

Constructor Summary
`ExporterConfig()`

Method Summary
`static Exporter` | `getExporter(Configuration config, String component, String entry)` Get an `Exporter` instance from a `Configuration` using the provided component name and entry.
`static Exporter` | `getExporter(Configuration config, String component, String entry, Exporter defaultExporter)` Get an `Exporter` instance from a `Configuration` using the provided component name and entry.

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

Field Detail

### DEFAULT_COMPONENT

    public static final String DEFAULT_COMPONENT

See Also:
  Constant Field Values

### ENTRY_NAME

    public static final String ENTRY_NAME

See Also:
  Constant Field Values

Constructor Detail

### ExporterConfig

    public ExporterConfig()

Method Detail

### getExporter

    public static Exporter getExporter(Configuration config,
                                       String component,
                                       String entry,
                                       Exporter defaultExporter)
                                throws ConfigurationException

  Get an `Exporter` instance from a `Configuration` using the provided component name and entry. This method will first establish what the default Exporter is as follows:
  - If the special entry `org.jini.rio.defaultExporter` can be found, the Exporter specified by this entry will be used as the default Exporter.
  - This method will then check if the component and entry provided exists. If the entry can be found in the provided Configuration that Exporter will be used. If the entry cannot be found, then the defaultExporter will be used as the Exporter.

  Parameters:
    `config` - The Configuration to obtain the Exporter from
    `component` - The component name
    `entry` - The entry name
    `defaultExporter` - The Exporter to use as a default if the special entry `org.jini.rio.defaultExporter` can not be found
  Returns:
    A suitable Exporter
  Throws:
    `ConfigurationException` - If there are errors reading the configuration

### getExporter

    public static Exporter getExporter(Configuration config,
                                       String component,
                                       String entry)
                                throws ConfigurationException

  Get an `Exporter` instance from a `Configuration` using the provided component name and entry. This method will first establish what the default Exporter is as follows:
  - If the special entry `org.jini.rio.defaultExporter` can be found, the Exporter specified by this entry will be used as the default Exporter. If the special `org.jini.rio.defaultExporter` entry cannot be found, the following Exporter will be used:

          String address = BootUtil.getHostAddressFromProperty("java.rmi.server.hostname");
          exporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(address, 0),
                                           new BasicILFactory(),
                                           false,
                                           true);

  - This method will then check if the component and entry provided exists. If the entry can be found in the provided Configuration that Exporter will be used. If the entry cannot be found, then a defaultExporter will be used as the Exporter.

  Parameters:
    `config` - The Configuration to obtain the Exporter from
    `component` - The component name
    `entry` - The entry name
  Returns:
    A suitable Exporter
  Throws:
    `ConfigurationException` - If there are errors reading the configuration

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.