public class RemoteServiceDistributionProvider extends Object implements IRemoteServiceDistributionProvider
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);
Modifier and Type | Class and Description |
---|---|
static class |
RemoteServiceDistributionProvider.Builder
Builder for RemoteServiceDistributionProvider instances
|
Modifier | Constructor and 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) |
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)
protected String getName()
protected RemoteServiceDistributionProvider setName(String name)
protected IContainerInstantiator getInstantiator()
protected RemoteServiceDistributionProvider setInstantiator(IContainerInstantiator instantiator)
protected String getDescription()
protected RemoteServiceDistributionProvider setDescription(String desc)
protected boolean isServer()
protected RemoteServiceDistributionProvider setServer(boolean server)
protected boolean isHidden()
protected RemoteServiceDistributionProvider setHidden(boolean hidden)
protected RemoteServiceDistributionProvider setNamespace(Namespace ns)
protected RemoteServiceDistributionProvider setContainerTypeDescriptionProperties(Dictionary<String,?> props)
protected RemoteServiceDistributionProvider setNamespaceProperties(Dictionary<String,?> props)
protected RemoteServiceDistributionProvider addAdapterConfig(AdapterConfig adapterConfig)
protected RemoteServiceDistributionProvider setAdapterConfig(AdapterConfig adapterConfig)
protected void validateComplete() throws NullPointerException
NullPointerException
public ContainerTypeDescription getContainerTypeDescription()
IRemoteServiceDistributionProvider
null
and
should be unique identified via it's name (obtained via ContainerTypeDescription.getName()
.getContainerTypeDescription
in interface IRemoteServiceDistributionProvider
null
.public Dictionary<String,?> getContainerTypeDescriptionProperties()
IRemoteServiceDistributionProvider
Null
may be returned.getContainerTypeDescriptionProperties
in interface IRemoteServiceDistributionProvider
null
.public Namespace getNamespace()
IRemoteServiceDistributionProvider
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()
.getNamespace
in interface IRemoteServiceDistributionProvider
null
.public Dictionary<String,?> getNamespaceProperties()
IRemoteServiceDistributionProvider
Null
may be returned.getNamespaceProperties
in interface IRemoteServiceDistributionProvider
null
.public AdapterConfig[] getAdapterConfigs()
IRemoteServiceDistributionProvider
getAdapterConfigs
in interface IRemoteServiceDistributionProvider
Copyright © 2017. All rights reserved.