org.eclipse.ecf.provider.r_osgi.identity

## Class R_OSGiNamespace

- java.lang.Object
- - org.eclipse.ecf.core.identity.Namespace
  - - org.eclipse.ecf.provider.r_osgi.identity.R_OSGiNamespace

All Implemented Interfaces:
  Serializable, org.eclipse.core.runtime.IAdaptable

Direct Known Subclasses:
  R_OSGiWSNamespace, R_OSGiWSSNamespace

    public class R_OSGiNamespace
    extends Namespace

The R-OSGi default transport namespace (r-osgi://).

See Also:
  Serialized Form

### Field Summary

Fields
`static String` `NAME`
`static String` `NAMESPACE_SCHEME` the namespace scheme.

### Fields inherited from class org.eclipse.ecf.core.identity.Namespace

`SCHEME_SEPARATOR`

### Constructor Summary

Constructors
`` `R_OSGiNamespace()` constructor.
`protected` `R_OSGiNamespace(String name, String description)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`ID` `createInstance(Object[] parameters)` create a new ID within this namespace.
`static Namespace` `getDefault()` get the singleton instance of this namespace.
`String` `getScheme()` get the scheme of this namespace.
`Class<?>[][]` `getSupportedParameterTypes()` Get the supported parameter types for IDs created via subsequent calls to `Namespace.createInstance(Object[])`.
`String[]` `getSupportedSchemes()` get all supported schemes.

### Methods inherited from class org.eclipse.ecf.core.identity.Namespace

`equals, getAdapter, getCompareToForObject, getDescription, getHashCodeForID, getInitStringFromExternalForm, getName, getNameForID, hashCode, initialize, testIDEquals, toExternalForm, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### NAME

    public static final String NAME

See Also:
  Constant Field Values

#### NAMESPACE_SCHEME

    public static final String NAMESPACE_SCHEME

the namespace scheme.

See Also:
  Constant Field Values

### Constructor Detail

#### R_OSGiNamespace

    public R_OSGiNamespace()

constructor.

#### R_OSGiNamespace

    protected R_OSGiNamespace(String name,
                              String description)

Parameters:
  `name` - name
  `description` - description
Since:
  3.5

### Method Detail

#### getDefault

    public static Namespace getDefault()

get the singleton instance of this namespace.

Returns:
  the instance.

#### createInstance

    public ID createInstance(Object[] parameters)
                      throws IDCreateException

create a new ID within this namespace.

Specified by:
  `createInstance` in class `Namespace`
Parameters:
  `parameters` - the parameter to pass to the ID.
Returns:
  the new ID
Throws:
  `IDCreateException` - if the creation fails.
See Also:
  `Namespace.createInstance(java.lang.Object[])`

#### getScheme

    public String getScheme()

get the scheme of this namespace.

Specified by:
  `getScheme` in class `Namespace`
Returns:
  the scheme.
See Also:
  `Namespace.getScheme()`

#### getSupportedSchemes

    public String[] getSupportedSchemes()

get all supported schemes.

Overrides:
  `getSupportedSchemes` in class `Namespace`
Returns:
  an array of supported schemes.
See Also:
  `Namespace.getSupportedSchemes()`

#### getSupportedParameterTypes

    public Class<?>[][] getSupportedParameterTypes()

Description copied from class: `Namespace`
Get the supported parameter types for IDs created via subsequent calls to `Namespace.createInstance(Object[])`. Callers may use this method to determine the available parameter types, and then create and pass in conforming Object arrays to to `Namespace.createInstance(Object[])`.

An empty two-dimensional array (new Class[0][0]) is the default returned by this abstract superclass. This means that the Object [] passed to `Namespace.createInstance(Object[])` will be ignored.

Subsclasses should override this method to specify the parameters that they will accept in calls to `Namespace.createInstance(Object[])`. The rows of the returned Class array are the acceptable types for a given invocation of createInstance.

Consider the following example:

     public Class[][] getSupportedParameterTypes() {
            return new Class[][] { { String.class }, { String.class, String.class } };
     }

The above means that there are two acceptable values for the Object [] passed into `Namespace.createInstance(Object[])`: 1) a single String, and 2) two Strings. These would therefore be acceptable as input to createInstance:

            ID newID1 = namespace.createInstance(new Object[] { "Hello" });
            ID newID2 = namespace.createInstance(new Object[] { "Hello", "There"}};

Overrides:
  `getSupportedParameterTypes` in class `Namespace`
Returns:
  Class [][] an array of class []s. Rows of the returned two-dimensional array define the acceptable parameter types for a single call to `Namespace.createInstance(Object[])`. If zero-length Class arrays are returned (i.e. Class[0][0]), then Object [] parameters to `Namespace.createInstance(Object[])` will be ignored.