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 ClassesModifier and TypeClassDescriptionstatic classBuilder for RemoteServiceDistributionProvider instances -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedprotectedRemoteServiceDistributionProvider(String name, IContainerInstantiator instantiator) protectedRemoteServiceDistributionProvider(String name, IContainerInstantiator instantiator, String description) protectedRemoteServiceDistributionProvider(String name, IContainerInstantiator instantiator, String description, boolean server) -
Method Summary
Modifier and TypeMethodDescriptionprotected RemoteServiceDistributionProvideraddAdapterConfig(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 Stringprotected IContainerInstantiatorprotected StringgetName()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 booleanisHidden()protected booleanisServer()protected RemoteServiceDistributionProvidersetAdapterConfig(AdapterConfig adapterConfig) protected RemoteServiceDistributionProviderprotected RemoteServiceDistributionProvidersetDescription(String desc) protected RemoteServiceDistributionProvidersetHidden(boolean hidden) protected RemoteServiceDistributionProvidersetInstantiator(IContainerInstantiator instantiator) protected RemoteServiceDistributionProviderprotected RemoteServiceDistributionProviderprotected RemoteServiceDistributionProvidersetNamespaceProperties(Dictionary<String, ?> props) protected RemoteServiceDistributionProvidersetServer(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:IRemoteServiceDistributionProviderReturn the ContainerTypeDescription to register for this distribution provider. The returned ContainerTypeDescription must not benulland should be unique identified via it's name (obtained viaContainerTypeDescription.getName().- Specified by:
getContainerTypeDescriptionin interfaceIRemoteServiceDistributionProvider- Returns:
- ContainerTypeDescription. Must not be
null.
-
getContainerTypeDescriptionProperties
Description copied from interface:IRemoteServiceDistributionProviderReturn any properties that are to be used when registering the ContainerTypeDescription returned by above method.Nullmay be returned.- Specified by:
getContainerTypeDescriptionPropertiesin interfaceIRemoteServiceDistributionProvider- Returns:
- Dictionary to use when registering the ContainerTypeDescription
May be
null.
-
getNamespace
Description copied from interface:IRemoteServiceDistributionProviderReturn 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:
getNamespacein interfaceIRemoteServiceDistributionProvider- Returns:
- ContainerTypeDescription. May be
null.
-
getNamespaceProperties
Description copied from interface:IRemoteServiceDistributionProviderReturn any properties that are to be used when registering the Namespace returned by above method.Nullmay be returned.- Specified by:
getNamespacePropertiesin interfaceIRemoteServiceDistributionProvider- Returns:
- Dictionary to use when registering this provider's Namespace.
May be
null.
-
getAdapterConfigs
Description copied from interface:IRemoteServiceDistributionProviderReturn any AdapterConfigs to register with the IAdapterManager- Specified by:
getAdapterConfigsin interfaceIRemoteServiceDistributionProvider- Returns:
- AdapterConfig[] holding any AdapterConfigs to be registered with the system-wide adaptermanager.
-