Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-02-23 19:19:27 +0000
committerslewis2009-02-23 19:19:27 +0000
commita9e10547c4c92520774f32f6c16d07c02e06bd96 (patch)
tree4f504e5eb7aa916cb52a27baef29b133bff73a9b
parentf9048718adda834bbb13888c70131d30c3ed7bd5 (diff)
downloadorg.eclipse.ecf-a9e10547c4c92520774f32f6c16d07c02e06bd96.tar.gz
org.eclipse.ecf-a9e10547c4c92520774f32f6c16d07c02e06bd96.tar.xz
org.eclipse.ecf-a9e10547c4c92520774f32f6c16d07c02e06bd96.zip
Added ECF ServicePublication properties to those sent out via discovery API
-rw-r--r--compendium/bundles/org.eclipse.ecf.osgi.services.discovery/META-INF/MANIFEST.MF1
-rw-r--r--compendium/bundles/org.eclipse.ecf.osgi.services.discovery/src/org/eclipse/ecf/internal/osgi/services/discovery/ServicePublicationHandler.java19
2 files changed, 19 insertions, 1 deletions
diff --git a/compendium/bundles/org.eclipse.ecf.osgi.services.discovery/META-INF/MANIFEST.MF b/compendium/bundles/org.eclipse.ecf.osgi.services.discovery/META-INF/MANIFEST.MF
index 65fe20ff3..2f51ecca0 100644
--- a/compendium/bundles/org.eclipse.ecf.osgi.services.discovery/META-INF/MANIFEST.MF
+++ b/compendium/bundles/org.eclipse.ecf.osgi.services.discovery/META-INF/MANIFEST.MF
@@ -13,6 +13,7 @@ Import-Package: org.eclipse.ecf.core,
org.eclipse.ecf.discovery,
org.eclipse.ecf.discovery.identity,
org.eclipse.ecf.discovery.service,
+ org.eclipse.ecf.remoteservice,
org.osgi.framework;version="1.3.0",
org.osgi.service.discovery;version="1.0.0",
org.osgi.util.tracker
diff --git a/compendium/bundles/org.eclipse.ecf.osgi.services.discovery/src/org/eclipse/ecf/internal/osgi/services/discovery/ServicePublicationHandler.java b/compendium/bundles/org.eclipse.ecf.osgi.services.discovery/src/org/eclipse/ecf/internal/osgi/services/discovery/ServicePublicationHandler.java
index b6f875fe8..4458660d9 100644
--- a/compendium/bundles/org.eclipse.ecf.osgi.services.discovery/src/org/eclipse/ecf/internal/osgi/services/discovery/ServicePublicationHandler.java
+++ b/compendium/bundles/org.eclipse.ecf.osgi.services.discovery/src/org/eclipse/ecf/internal/osgi/services/discovery/ServicePublicationHandler.java
@@ -21,7 +21,7 @@ import org.eclipse.ecf.discovery.identity.IServiceID;
import org.eclipse.ecf.discovery.identity.ServiceIDFactory;
import org.eclipse.ecf.discovery.service.IDiscoveryService;
import org.eclipse.ecf.osgi.services.discovery.ECFServicePublication;
-import org.osgi.framework.Constants;
+import org.eclipse.ecf.remoteservice.Constants;
import org.osgi.framework.ServiceReference;
import org.osgi.service.discovery.*;
import org.osgi.util.tracker.ServiceTrackerCustomizer;
@@ -190,6 +190,23 @@ public class ServicePublicationHandler implements ServiceTrackerCustomizer {
IServiceProperties serviceProperties = createServiceProperties(
svcInterfaces, interfaceVersions, endpointInterfaces,
svcProperties, location, id);
+ // ECF remote service property
+ // Specify container factory name
+ String serviceContainerFactoryName = (String) serviceReference
+ .getProperty(Constants.SERVICE_CONTAINER_FACTORY_NAME);
+ if (serviceContainerFactoryName != null) {
+ serviceProperties.setPropertyString(
+ Constants.SERVICE_CONTAINER_FACTORY_NAME,
+ serviceContainerFactoryName);
+ }
+ // ECF remote service property
+ // Specify remote service namespace name
+ String serviceNamespace = (String) serviceReference
+ .getProperty(Constants.SERVICE_NAMESPACE);
+ if (serviceNamespace != null) {
+ serviceProperties.setPropertyString(Constants.SERVICE_NAMESPACE,
+ serviceNamespace);
+ }
return new ServiceInfo(uri, serviceID, serviceProperties);
}

Back to the top