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
Modifier and TypeClassDescriptionstatic class
Builder for RemoteServiceDistributionProvider instances -
Constructor Summary
ModifierConstructorDescriptionprotected
protected
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
Modifier and TypeMethodDescriptionprotected RemoteServiceDistributionProvider
addAdapterConfig
(AdapterConfig adapterConfig) Return any AdapterConfigs to register with the IAdapterManagerReturn the ContainerTypeDescription to register for this distribution provider.Dictionary<String,
?> Return any properties that are to be used when registering the ContainerTypeDescription returned by above method.protected String
protected IContainerInstantiator
protected String
getName()
Return the Namespace (or subclass) to register for this distribution provider.Dictionary<String,
?> 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
protected RemoteServiceDistributionProvider
setDescription
(String desc) protected RemoteServiceDistributionProvider
setHidden
(boolean hidden) protected RemoteServiceDistributionProvider
setInstantiator
(IContainerInstantiator instantiator) protected RemoteServiceDistributionProvider
protected RemoteServiceDistributionProvider
protected RemoteServiceDistributionProvider
setNamespaceProperties
(Dictionary<String, ?> props) protected RemoteServiceDistributionProvider
setServer
(boolean server) protected void
-
Constructor Details
-
RemoteServiceDistributionProvider
protected RemoteServiceDistributionProvider() -
RemoteServiceDistributionProvider
-
RemoteServiceDistributionProvider
-
RemoteServiceDistributionProvider
protected RemoteServiceDistributionProvider(String name, IContainerInstantiator instantiator, String description) -
RemoteServiceDistributionProvider
protected RemoteServiceDistributionProvider(String name, IContainerInstantiator instantiator, String description, boolean server)
-
-
Method Details
-
getName
-
setName
-
getInstantiator
-
setInstantiator
-
getDescription
-
setDescription
-
isServer
protected boolean isServer() -
setServer
-
isHidden
protected boolean isHidden() -
setHidden
-
setNamespace
-
setContainerTypeDescriptionProperties
protected RemoteServiceDistributionProvider setContainerTypeDescriptionProperties(Dictionary<String, ?> props) -
setNamespaceProperties
-
addAdapterConfig
-
setAdapterConfig
-
validateComplete
- Throws:
NullPointerException
-
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
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
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
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
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.
-