diff options
Diffstat (limited to 'examples/bundles/com.mycorp.examples.timeservice.provider.rest.consumer/src/com/mycorp/examples/timeservice/internal/provider/rest/consumer/Activator.java')
-rw-r--r-- | examples/bundles/com.mycorp.examples.timeservice.provider.rest.consumer/src/com/mycorp/examples/timeservice/internal/provider/rest/consumer/Activator.java | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/examples/bundles/com.mycorp.examples.timeservice.provider.rest.consumer/src/com/mycorp/examples/timeservice/internal/provider/rest/consumer/Activator.java b/examples/bundles/com.mycorp.examples.timeservice.provider.rest.consumer/src/com/mycorp/examples/timeservice/internal/provider/rest/consumer/Activator.java index d160e01aa..c55e0f837 100644 --- a/examples/bundles/com.mycorp.examples.timeservice.provider.rest.consumer/src/com/mycorp/examples/timeservice/internal/provider/rest/consumer/Activator.java +++ b/examples/bundles/com.mycorp.examples.timeservice.provider.rest.consumer/src/com/mycorp/examples/timeservice/internal/provider/rest/consumer/Activator.java @@ -1,20 +1,18 @@ package com.mycorp.examples.timeservice.internal.provider.rest.consumer; -import org.eclipse.core.runtime.SafeRunner; -import org.eclipse.ecf.core.ContainerTypeDescription; -import org.eclipse.ecf.core.util.ExtensionRegistryRunnable; +import org.eclipse.ecf.remoteservice.provider.IRemoteServiceDistributionProvider; +import org.eclipse.ecf.remoteservice.provider.RemoteServiceDistributionProvider; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; public class Activator implements BundleActivator { public void start(final BundleContext context) throws Exception { - SafeRunner.run(new ExtensionRegistryRunnable(context) { - @Override - protected void runWithoutRegistry() throws Exception { - context.registerService(ContainerTypeDescription.class, new ContainerTypeDescription(TimeServiceRestClientContainer.TIMESERVICE_CONSUMER_CONFIG_NAME, new TimeServiceRestClientContainerInstantiator(), "TimeService REST Client", false ,false), null); - } - }); + context.registerService(IRemoteServiceDistributionProvider.class, + new RemoteServiceDistributionProvider.Builder() + .setName(TimeServiceRestClientContainer.TIMESERVICE_CONSUMER_CONFIG_NAME) + .setInstantiator(new TimeServiceRestClientContainer.Instantiator()).build(), + null); } public void stop(BundleContext context) throws Exception { |