Class 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