Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2014-03-31 04:02:11 +0000
committerslewis2014-03-31 04:02:11 +0000
commitdc21fceea68dac3130698ca8fdb74431953d030a (patch)
tree2fe2122000a553ecca90046de714430ae97304ee /providers
parent4e613370ac1e29572d1c7f597de1adc701efcbbb (diff)
downloadorg.eclipse.ecf-dc21fceea68dac3130698ca8fdb74431953d030a.tar.gz
org.eclipse.ecf-dc21fceea68dac3130698ca8fdb74431953d030a.tar.xz
org.eclipse.ecf-dc21fceea68dac3130698ca8fdb74431953d030a.zip
Additions to allow org.eclipse.ecf.provider.jslp to be used without
extension registry bug 421569 Change-Id: I0000000000000000000000000000000000000000
Diffstat (limited to 'providers')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jslp/META-INF/MANIFEST.MF2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/internal/provider/jslp/Activator.java17
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/provider/jslp/identity/JSLPNamespace.java4
3 files changed, 20 insertions, 3 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.jslp/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.jslp/META-INF/MANIFEST.MF
index 2d62d7871..f8b5eb56a 100644
--- a/providers/bundles/org.eclipse.ecf.provider.jslp/META-INF/MANIFEST.MF
+++ b/providers/bundles/org.eclipse.ecf.provider.jslp/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.ecf.provider.jslp;singleton:=true
-Bundle-Version: 3.1.0.qualifier
+Bundle-Version: 3.2.0.qualifier
Bundle-Activator: org.eclipse.ecf.internal.provider.jslp.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/internal/provider/jslp/Activator.java b/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/internal/provider/jslp/Activator.java
index 3a09c540b..49917c798 100644
--- a/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/internal/provider/jslp/Activator.java
+++ b/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/internal/provider/jslp/Activator.java
@@ -13,13 +13,17 @@ package org.eclipse.ecf.internal.provider.jslp;
import ch.ethz.iks.slp.Advertiser;
import ch.ethz.iks.slp.Locator;
import java.util.Properties;
-import org.eclipse.ecf.core.ContainerConnectException;
-import org.eclipse.ecf.core.IContainer;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.ecf.core.*;
+import org.eclipse.ecf.core.identity.Namespace;
+import org.eclipse.ecf.core.util.ExtensionRegistryRunnable;
import org.eclipse.ecf.core.util.Trace;
import org.eclipse.ecf.discovery.IDiscoveryAdvertiser;
import org.eclipse.ecf.discovery.IDiscoveryLocator;
import org.eclipse.ecf.discovery.service.IDiscoveryService;
+import org.eclipse.ecf.provider.jslp.container.ContainerInstantiator;
import org.eclipse.ecf.provider.jslp.container.JSLPDiscoveryContainer;
+import org.eclipse.ecf.provider.jslp.identity.JSLPNamespace;
import org.osgi.framework.*;
import org.osgi.util.tracker.ServiceTracker;
@@ -82,6 +86,15 @@ public class Activator implements BundleActivator {
public void start(final BundleContext context) throws Exception {
bundleContext = context;
+ SafeRunner.run(new ExtensionRegistryRunnable(context) {
+ protected void runWithoutRegistry() throws Exception {
+ context.registerService(Namespace.class, new JSLPNamespace(), null);
+ context.registerService(ContainerTypeDescription.class, new ContainerTypeDescription("ecf.discovery.jslp", new ContainerInstantiator(), "JSLP Discovery Container", true, false), null); //$NON-NLS-1$//$NON-NLS-2$
+ context.registerService(ContainerTypeDescription.class, new ContainerTypeDescription("ecf.discovery.jslp.locator", new ContainerInstantiator(), "JSLP Discovery Locator Container", true, false), null); //$NON-NLS-1$//$NON-NLS-2$
+ context.registerService(ContainerTypeDescription.class, new ContainerTypeDescription("ecf.discovery.jslp.advertiser", new ContainerInstantiator(), "JSLP Discovery Advertiser Container", true, false), null); //$NON-NLS-1$//$NON-NLS-2$
+ }
+ });
+
// initially get the locator and add a life cycle listener
locatorSt = new ServiceTracker(context, Locator.class.getName(), null);
diff --git a/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/provider/jslp/identity/JSLPNamespace.java b/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/provider/jslp/identity/JSLPNamespace.java
index e0d45cc7e..505831d92 100644
--- a/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/provider/jslp/identity/JSLPNamespace.java
+++ b/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/provider/jslp/identity/JSLPNamespace.java
@@ -23,6 +23,10 @@ public class JSLPNamespace extends Namespace {
public static final String NAME = "ecf.namespace.slp"; //$NON-NLS-1$
+ public JSLPNamespace() {
+ super(NAME, "JSLP Namespace"); //$NON-NLS-1$
+ }
+
/* (non-Javadoc)
* @see org.eclipse.ecf.core.identity.Namespace#createInstance(java.lang.Object[])
*/

Back to the top