Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-12-17 23:08:19 +0000
committerslewis2008-12-17 23:08:19 +0000
commit907cc2a11a3c6b9409c4cb4ba639038c77c19c4d (patch)
tree8e28f5519cc4664f5fef1dc6ce893c3549292ec1 /server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server
parentcf7b1b3323afc15c46520993d2892f4d98d16fe2 (diff)
downloadorg.eclipse.ecf-907cc2a11a3c6b9409c4cb4ba639038c77c19c4d.tar.gz
org.eclipse.ecf-907cc2a11a3c6b9409c4cb4ba639038c77c19c4d.tar.xz
org.eclipse.ecf-907cc2a11a3c6b9409c4cb4ba639038c77c19c4d.zip
Fix from bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=259041
Diffstat (limited to 'server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server')
-rw-r--r--server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server/META-INF/MANIFEST.MF2
-rw-r--r--server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server/src/org/eclipse/ecf/internal/examples/updatesite/DiscoverableServer.java5
-rw-r--r--server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server/src/org/eclipse/ecf/internal/examples/updatesite/UpdateSiteProperties.java11
3 files changed, 5 insertions, 13 deletions
diff --git a/server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server/META-INF/MANIFEST.MF b/server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server/META-INF/MANIFEST.MF
index 1cc71b655..99112a558 100644
--- a/server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server/META-INF/MANIFEST.MF
+++ b/server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server/META-INF/MANIFEST.MF
@@ -8,7 +8,7 @@ Bundle-Vendor: %plugin.provider
Bundle-RequiredExecutionEnvironment: J2SE-1.4
Bundle-Localization: plugin
Import-Package: javax.naming,
- javax.servlet.http;version="[2.4.0,2.5.0)",
+ javax.servlet.http;version="[2.4.0,2.6.0)",
org.eclipse.osgi.util,
org.osgi.framework,
org.osgi.service.http,
diff --git a/server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server/src/org/eclipse/ecf/internal/examples/updatesite/DiscoverableServer.java b/server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server/src/org/eclipse/ecf/internal/examples/updatesite/DiscoverableServer.java
index 16c5bf178..b2acb6a87 100644
--- a/server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server/src/org/eclipse/ecf/internal/examples/updatesite/DiscoverableServer.java
+++ b/server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server/src/org/eclipse/ecf/internal/examples/updatesite/DiscoverableServer.java
@@ -11,7 +11,7 @@
package org.eclipse.ecf.internal.examples.updatesite;
-import java.net.URL;
+import java.net.*;
import java.security.InvalidParameterException;
import java.util.Map;
import javax.naming.ServiceUnavailableException;
@@ -70,7 +70,8 @@ public class DiscoverableServer implements IApplication {
// Create service id
IServiceID serviceID = ServiceIDFactory.getDefault().createServiceID(discovery.getServicesNamespace(), getCompleteServiceType(), serviceName);
// create service info
- serviceInfo = new ServiceInfo(serviceType, null, getServicePort(), serviceID, new ServiceProperties(new UpdateSiteProperties(serviceName, servicePath).toProperties()));
+ URI uri = URI.create("http://" + InetAddress.getLocalHost().getHostAddress() + ":" + getServicePort() + servicePath); //$NON-NLS-1$ //$NON-NLS-2$
+ serviceInfo = new ServiceInfo(uri, serviceID, new ServiceProperties(new UpdateSiteProperties(serviceName).toProperties()));
// get http service
final HttpService httpService = Activator.getDefault().waitForHttpService(2000);
diff --git a/server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server/src/org/eclipse/ecf/internal/examples/updatesite/UpdateSiteProperties.java b/server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server/src/org/eclipse/ecf/internal/examples/updatesite/UpdateSiteProperties.java
index 7ce2a2dab..a572248ad 100644
--- a/server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server/src/org/eclipse/ecf/internal/examples/updatesite/UpdateSiteProperties.java
+++ b/server-side/examples/bundles/org.eclipse.ecf.examples.updatesite.server/src/org/eclipse/ecf/internal/examples/updatesite/UpdateSiteProperties.java
@@ -15,33 +15,24 @@ import java.util.Properties;
import org.eclipse.ecf.discovery.IServiceProperties;
public class UpdateSiteProperties {
- String path;
String name;
- public static final String PATH_PROPERTY = "path"; //$NON-NLS-1$
public static final String NAME_PROPERTY = "name"; //$NON-NLS-1$
- public UpdateSiteProperties(String name, String path) {
- this.path = path;
+ public UpdateSiteProperties(String name) {
this.name = name;
}
public UpdateSiteProperties(IServiceProperties serviceProperties) {
- this.path = serviceProperties.getPropertyString(PATH_PROPERTY);
this.name = serviceProperties.getPropertyString(NAME_PROPERTY);
}
- public String getPath() {
- return path;
- }
-
public String getName() {
return name;
}
public Properties toProperties() {
final Properties props = new Properties();
- props.put(PATH_PROPERTY, this.path);
props.put(NAME_PROPERTY, this.name);
return props;
}

Back to the top