org.eclipse.ecf.remoteservice.provider

## Class RemoteServiceDistributionProvider

- java.lang.Object
- - org.eclipse.ecf.remoteservice.provider.RemoteServiceDistributionProvider

All Implemented Interfaces:
  IRemoteServiceDistributionProvider

    public class RemoteServiceDistributionProvider
    extends Object
    implements IRemoteServiceDistributionProvider

Basic implementation of IRemoteServiceDistributionProvider. Intended to be subclassed by distribution provider implementations and or use Builder static inner class to create/build instances.

Please NOTE: IRemoteServiceDistributionProviders should be registered (and therefore the bundles containing implementations started) before any remote services using these distribution providers are exported. In other words, if you create and register a IRemoteServiceDistributionProvider with name 'com.myproject.myprovider' the provider implementation bundle should be started and the IRemoteServiceDistributionProvider service must be registered prior to registering the service that is to be exported using that provider. For example

     #Must first register the com.myproject.myprovider distribution provider, so it's available
     providerBuilder.setName('com.myproject.myprovider')...
     bundleContext.registerService(IRemoteServiceDistributionProvider.class,providerBuilder.build(),null);

     ...

     #Then may register a remote service that uses com.myproject.myprovider distribution provider
     props.put("service.exported.interfaces","*");

     #This specifies that com.myproject.myprovider is to be used to export the service, but the above registration
     #must take place before MyService registration so it can be active for exporting this service
     props.put("service.exported.configs","com.myproject.myprovider");

     #With usual topology manager the following will export MyService using com.myproject.myprovider
     #distribution provider
     bundleContext.registerService(MyService.class,new MyServiceImpl(),props);

Since:
  8.7

### Nested Class Summary

Nested Classes
`static class` `RemoteServiceDistributionProvider.Builder` Builder for RemoteServiceDistributionProvider instances

### Constructor Summary

Constructors
`protected` `RemoteServiceDistributionProvider()`
`protected` `RemoteServiceDistributionProvider(String name)`
`protected` `RemoteServiceDistributionProvider(String name, IContainerInstantiator instantiator)`
`protected` `RemoteServiceDistributionProvider(String name, IContainerInstantiator instantiator, String description)`
`protected` `RemoteServiceDistributionProvider(String name, IContainerInstantiator instantiator, String description, boolean server)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected RemoteServiceDistributionProvider` `addAdapterConfig(AdapterConfig adapterConfig)`
`AdapterConfig[]` `getAdapterConfigs()` Return any AdapterConfigs to register with the IAdapterManager
`ContainerTypeDescription` `getContainerTypeDescription()` Return the ContainerTypeDescription to register for this distribution provider.
`Dictionary<String,?>` `getContainerTypeDescriptionProperties()` Return any properties that are to be used when registering the ContainerTypeDescription returned by above method.
`protected String` `getDescription()`
`protected IContainerInstantiator` `getInstantiator()`
`protected String` `getName()`
`Namespace` `getNamespace()` Return the Namespace (or subclass) to register for this distribution provider.
`Dictionary<String,?>` `getNamespaceProperties()` Return any properties that are to be used when registering the Namespace returned by above method.
`protected boolean` `isHidden()`
`protected boolean` `isServer()`
`protected RemoteServiceDistributionProvider` `setAdapterConfig(AdapterConfig adapterConfig)`
`protected RemoteServiceDistributionProvider` `setContainerTypeDescriptionProperties(Dictionary<String,?> props)`
`protected RemoteServiceDistributionProvider` `setDescription(String desc)`
`protected RemoteServiceDistributionProvider` `setHidden(boolean hidden)`
`protected RemoteServiceDistributionProvider` `setInstantiator(IContainerInstantiator instantiator)`
`protected RemoteServiceDistributionProvider` `setName(String name)`
`protected RemoteServiceDistributionProvider` `setNamespace(Namespace ns)`
`protected RemoteServiceDistributionProvider` `setNamespaceProperties(Dictionary<String,?> props)`
`protected RemoteServiceDistributionProvider` `setServer(boolean server)`
`protected void` `validateComplete()`

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### RemoteServiceDistributionProvider

    protected RemoteServiceDistributionProvider()

#### RemoteServiceDistributionProvider

    protected RemoteServiceDistributionProvider(String name)

#### RemoteServiceDistributionProvider

    protected RemoteServiceDistributionProvider(String name,
                                                IContainerInstantiator instantiator)

#### RemoteServiceDistributionProvider

    protected RemoteServiceDistributionProvider(String name,
                                                IContainerInstantiator instantiator,
                                                String description)

#### RemoteServiceDistributionProvider

    protected RemoteServiceDistributionProvider(String name,
                                                IContainerInstantiator instantiator,
                                                String description,
                                                boolean server)

### Method Detail

#### getName

    protected String getName()

#### setName

    protected RemoteServiceDistributionProvider setName(String name)

#### getInstantiator

    protected IContainerInstantiator getInstantiator()

#### setInstantiator

    protected RemoteServiceDistributionProvider setInstantiator(IContainerInstantiator instantiator)

#### getDescription

    protected String getDescription()

#### setDescription

    protected RemoteServiceDistributionProvider setDescription(String desc)

#### isServer

    protected boolean isServer()

#### setServer

    protected RemoteServiceDistributionProvider setServer(boolean server)

#### isHidden

    protected boolean isHidden()

#### setHidden

    protected RemoteServiceDistributionProvider setHidden(boolean hidden)

#### setNamespace

    protected RemoteServiceDistributionProvider setNamespace(Namespace ns)

#### setContainerTypeDescriptionProperties

    protected RemoteServiceDistributionProvider setContainerTypeDescriptionProperties(Dictionary<String,?> props)

#### setNamespaceProperties

    protected RemoteServiceDistributionProvider setNamespaceProperties(Dictionary<String,?> props)

#### addAdapterConfig

    protected RemoteServiceDistributionProvider addAdapterConfig(AdapterConfig adapterConfig)

#### setAdapterConfig

    protected RemoteServiceDistributionProvider setAdapterConfig(AdapterConfig adapterConfig)

#### validateComplete

    protected void validateComplete()
                             throws NullPointerException

Throws:
  `NullPointerException`

#### getContainerTypeDescription

    public ContainerTypeDescription getContainerTypeDescription()

Description copied from interface: `IRemoteServiceDistributionProvider`
Return the ContainerTypeDescription to register for this distribution provider. The returned ContainerTypeDescription must not be `null` and should be unique identified via it's name (obtained via `ContainerTypeDescription.getName()`.

Specified by:
  `getContainerTypeDescription` in interface `IRemoteServiceDistributionProvider`
Returns:
  ContainerTypeDescription. Must not be `null`.

#### getContainerTypeDescriptionProperties

    public Dictionary<String,?> getContainerTypeDescriptionProperties()

Description copied from interface: `IRemoteServiceDistributionProvider`
Return any properties that are to be used when registering the ContainerTypeDescription returned by above method. `Null` may be returned.

Specified by:
  `getContainerTypeDescriptionProperties` in interface `IRemoteServiceDistributionProvider`
Returns:
  Dictionary to use when registering the ContainerTypeDescription May be `null`.

#### getNamespace

    public Namespace getNamespace()

Description copied from interface: `IRemoteServiceDistributionProvider`
Return the Namespace (or subclass) to register for this distribution provider. The returned Namespace may be `null`. In that case, no new Namespace will be registered. If the returned Namespace is non-null, It should be uniquely identified via it's name (obtained via `Namespace.getName()`.

Specified by:
  `getNamespace` in interface `IRemoteServiceDistributionProvider`
Returns:
  ContainerTypeDescription. May be `null`.

#### getNamespaceProperties

    public Dictionary<String,?> getNamespaceProperties()

Description copied from interface: `IRemoteServiceDistributionProvider`
Return any properties that are to be used when registering the Namespace returned by above method. `Null` may be returned.

Specified by:
  `getNamespaceProperties` in interface `IRemoteServiceDistributionProvider`
Returns:
  Dictionary to use when registering this provider's Namespace. May be `null`.

#### getAdapterConfigs

    public AdapterConfig[] getAdapterConfigs()

Description copied from interface: `IRemoteServiceDistributionProvider`
Return any AdapterConfigs to register with the IAdapterManager

Specified by:
  `getAdapterConfigs` in interface `IRemoteServiceDistributionProvider`
Returns:
  AdapterConfig[] holding any AdapterConfigs to be registered with the system-wide adaptermanager.