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 AggregateConfig

    java.lang.Object
      net.jini.config.AbstractConfiguration
          net.jini.config.ConfigurationFile
              org.jini.rio.config.AggregateConfig

All Implemented Interfaces:
  Configuration

    public class AggregateConfig

extends ConfigurationFile

The AggregateConfig provides an approach to declare special entries which can be resolved in a "common" `Configuration`. The org.jini.rio.config.AggregateConfig extends `ConfigurationFile`, and overrides the `ConfigurationFile.getSpecialEntry(java.lang.String)` and `ConfigurationFile.getSpecialEntryType(java.lang.String)` methods to resolve entries (other then $loader and $data) which begin with $

AggregateConfig can be used directly, or configured for `ConfigurationProvider` support by specifying the `META-INF/services/...` configuration setup. The following examples illustrate how to use the AggregateConfig :

- In an OperationalString XML document using the <Configuration> element

<Configuration>
<Component Name="org.jini.rio">
<Parameter
Name="defaultExporter"
Value="$org_jini_rio_defaultExporter"/>
</Component>
</Configuration>

- Use in a configuration file :

org.jini.rio.watch {
watchDataSourceExporter = $org_jini_rio_defaultExporter;
}

Nested Class Summary

Nested classes/interfaces inherited from class net.jini.config.ConfigurationFile
`ConfigurationFile.ErrorDescriptor`

Nested classes/interfaces inherited from class net.jini.config.AbstractConfiguration
`AbstractConfiguration.Primitive`

Field Summary

Fields inherited from interface net.jini.config.Configuration
`NO_DATA, NO_DEFAULT`

Constructor Summary
`AggregateConfig(Configuration config, String[] configArgs)` Create an AggregateConfig
`AggregateConfig(Configuration config, String[] configArgs, ClassLoader loader)` Create an AggregateConfig
`AggregateConfig(String[] configs)` Create an AggregateConfig
`AggregateConfig(String[] configs, ClassLoader loader)` Create an AggregateConfig

Method Summary
`Configuration` | `getCommonConfiguration()` Get the common configuration this class was created with
`protected Object` | `getSpecialEntry(String name)` Override parent's getSpecialEntry.
`protected Class` | `getSpecialEntryType(String name)` Override parent's getSpecialEntryType.

Methods inherited from class net.jini.config.ConfigurationFile
`getEntryInternal, getEntryNames, getEntryType, throwConfigurationException, toString`

Methods inherited from class net.jini.config.AbstractConfiguration
`getEntry, getEntry, getEntry, validIdentifier, validQualifiedIdentifier`

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

Constructor Detail

### AggregateConfig

    public AggregateConfig(Configuration config,
                           String[] configArgs)
                    throws ConfigurationException

  Create an AggregateConfig

  Parameters:
    `config` - The "common" Configuration
    `configArgs` - Configuration arguments which may declare entries of the form $component_entry. These entries will be resolved in the "common" Configuration. Parsing of the end config would be done by ConfigurationFile which delegates special entry resolution to this class.
  Throws:
    `ConfigurationException` - If there are errors creating the Configuration

### AggregateConfig

    public AggregateConfig(Configuration config,
                           String[] configArgs,
                           ClassLoader loader)
                    throws ConfigurationException

  Create an AggregateConfig

  Parameters:
    `config` - - The "common" Configuration
    `configArgs` - - Configuration arguments which may declare entries of the form $component_entry. These entries will be resolved in the "common" Configuration. Parsing of the end config would be done by ConfigurationFile which delegates special entry resolution to this class.
    `loader` - - The class loader to use for interpreting class names
  Throws:
    `ConfigurationException` - If there are errors creating the Configuration

### AggregateConfig

    public AggregateConfig(String[] configs)
                    throws ConfigurationException

  Create an AggregateConfig

  Parameters:
    `configs` - An array of configArgs, where the common config is specified as the last element of the array. The first element of the array defines the config which may may declare entries of the form $component_entry. These entries will be resolved in the "common" Configuration. Parsing of the end config would be done by ConfigurationFile which delegates special entry resolution to this class.
  Throws:
    `ConfigurationException` - If there are errors creating the Configuration

### AggregateConfig

    public AggregateConfig(String[] configs,
                           ClassLoader loader)
                    throws ConfigurationException

  Create an AggregateConfig

  Parameters:
    `configs` - An array of configArgs, where the common config is specified as the last element of the array. The first element of the array defines the config which may may declare entries of the form $component_entry. These entries will be resolved in the "common" Configuration. Parsing of the end config would be done by ConfigurationFile which delegates special entry resolution to this class.
    `loader` - - The class loader to use for interpreting class names
  Throws:
    `ConfigurationException` - If there are errors creating the Configuration

Method Detail

### getCommonConfiguration

    public Configuration getCommonConfiguration()

  Get the common configuration this class was created with

  Returns:
    The common `Configuration` object.

### getSpecialEntry

    protected Object getSpecialEntry(String name)
                              throws ConfigurationException

  Override parent's getSpecialEntry. Parsing of special entries, entries other then $loader and $data will result in a call to getSpecialEntry() for any other expression that starts with '$'.

  Overrides:
    `getSpecialEntry` in class `ConfigurationFile`
  Parameters:
    `name` - The name of the special entry of the form $component_entry. The name will be used to obtain the component and entry values, then call getEntry on the common Configurtion to return the common or shared entry
  Returns:
    Returns an object of the specified type created using the information from the derived component and name
  Throws:
    `ConfigurationException`

### getSpecialEntryType

    protected Class getSpecialEntryType(String name)
                                 throws ConfigurationException

  Override parent's getSpecialEntryType.

  Overrides:
    `getSpecialEntryType` in class `ConfigurationFile`
  Parameters:
    `name` - The name of the special entry of the form $component_entry
  Returns:
    Returns the type of the special entry created using the information from the derived component and name
  Throws:
    `ConfigurationException`

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.