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 Modifier and Type Class Description static class
RemoteServiceDistributionProvider.Builder
Builder for RemoteServiceDistributionProvider instances
-
Constructor Summary
Constructors Modifier Constructor Description 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
-
-
-
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 benull
and should be unique identified via it's name (obtained viaContainerTypeDescription.getName()
.- Specified by:
getContainerTypeDescription
in interfaceIRemoteServiceDistributionProvider
- 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 interfaceIRemoteServiceDistributionProvider
- 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 benull
. 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 viaNamespace.getName()
.- Specified by:
getNamespace
in interfaceIRemoteServiceDistributionProvider
- 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 interfaceIRemoteServiceDistributionProvider
- 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 interfaceIRemoteServiceDistributionProvider
- Returns:
- AdapterConfig[] holding any AdapterConfigs to be registered with the system-wide adaptermanager.
-
-