Package org.eclipse.ecf.provider.remoteservice.generic

# Class RemoteServiceNamespace

java.lang.Object
org.eclipse.ecf.core.identity.Namespace
org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceNamespace

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

public class RemoteServiceNamespace extends Namespace

Since:
  3.0
See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`NAME`

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

`SCHEME_SEPARATOR`

## Constructor Summary

Constructors
Constructor
Description
`RemoteServiceNamespace()`
`RemoteServiceNamespace(String name, String desc)`

## Method Summary

Modifier and Type
Method
Description
`ID`
`createInstance(Object[] parameters)`
Make an instance of this namespace.
`String`
`getScheme()`
Get the primary scheme associated with this namespace.
`Class<?>[][]`
`getSupportedParameterTypes()`
Get the supported parameter types for IDs created via subsequent calls to `Namespace.createInstance(Object[])`.

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

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

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

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

## Field Details

### NAME

public static final String NAME

See Also:
  - Constant Field Values

## Constructor Details

### RemoteServiceNamespace

public RemoteServiceNamespace()

### RemoteServiceNamespace

public RemoteServiceNamespace(String name, String desc)

## Method Details

### createInstance

public ID createInstance(Object[] parameters) throws IDCreateException
Description copied from class: `Namespace`
Make an instance of this namespace. Namespace subclasses, provided by plugins must implement this method to construct ID instances for the given namespace.

See `Namespace.getSupportedParameterTypes()` to get information relevant to deciding what parameter types are expected by this method.

Specified by:
  `createInstance` in class `Namespace`
Parameters:
  `parameters` - an Object[] of parameters for creating ID instances. May be null.
Returns:
  a non-null ID instance. The class used may extend BaseID or may implement the ID interface directly
Throws:
  `IDCreateException` - if construction fails

### getScheme

public String getScheme()
Description copied from class: `Namespace`
Get the primary scheme associated with this namespace. Subclasses must provide an implementation that returns a non-`null` scheme identifier. Note that the returned scheme should not contain the Namespace.SCHEME_SEPARATOR (\":\").

Specified by:
  `getScheme` in class `Namespace`
Returns:
  a String scheme identifier. Must not be `null`.

### 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.