Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-02-08 22:15:06 +0000
committerslewis2008-02-08 22:15:06 +0000
commit636d43b8d6227a3044846a3c453c36a3531f553c (patch)
treef8765b924d8f3e004d7282653050a59bd016c99a /framework/bundles/org.eclipse.ecf.discovery
parent031455140b28c787150435c7f863fcf140dca9be (diff)
downloadorg.eclipse.ecf-636d43b8d6227a3044846a3c453c36a3531f553c.tar.gz
org.eclipse.ecf-636d43b8d6227a3044846a3c453c36a3531f553c.tar.xz
org.eclipse.ecf-636d43b8d6227a3044846a3c453c36a3531f553c.zip
Fix for bug 218306
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.discovery')
-rw-r--r--framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceInfo.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceInfo.java b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceInfo.java
index a8910da15..351d09309 100644
--- a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceInfo.java
+++ b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceInfo.java
@@ -27,7 +27,7 @@ public class ServiceInfo implements IServiceInfo, Serializable, IContainerServic
public static final int DEFAULT_PRIORITY = -1;
public static final int DEFAULT_WEIGHT = -1;
- public static final String DEFAULT_PROTOCOL = "xxxxx"; //$NON-NLS-1$
+ public static final String UNKNOWN_PROTOCOL = "unknown"; //$NON-NLS-1$
protected URI uri = null;
@@ -53,11 +53,11 @@ public class ServiceInfo implements IServiceInfo, Serializable, IContainerServic
this.properties = (props == null) ? new ServiceProperties() : props;
}
- public ServiceInfo(String host, int port, IServiceID serviceID, int priority, int weight, IServiceProperties props) {
+ public ServiceInfo(String protocol, String host, int port, IServiceID serviceID, int priority, int weight, IServiceProperties props) {
try {
if (host == null)
host = InetAddress.getLocalHost().getHostAddress();
- uri = new URI(DEFAULT_PROTOCOL, null, host, port, null, null, null);
+ uri = new URI((protocol == null) ? UNKNOWN_PROTOCOL : protocol, null, host, port, null, null, null);
} catch (URISyntaxException e) {
throw new IllegalArgumentException(Messages.ServiceInfo_EXCEPTION_INVALID_HOST_ARG);
} catch (UnknownHostException e) {
@@ -70,12 +70,12 @@ public class ServiceInfo implements IServiceInfo, Serializable, IContainerServic
this.properties = (props == null) ? new ServiceProperties() : props;
}
- public ServiceInfo(String host, int port, IServiceID serviceID, IServiceProperties props) {
- this(host, port, serviceID, DEFAULT_PRIORITY, DEFAULT_WEIGHT, props);
+ public ServiceInfo(String protocol, String host, int port, IServiceID serviceID, IServiceProperties props) {
+ this(protocol, host, port, serviceID, DEFAULT_PRIORITY, DEFAULT_WEIGHT, props);
}
- public ServiceInfo(String host, int port, IServiceID serviceID) {
- this(host, port, serviceID, new ServiceProperties());
+ public ServiceInfo(String protocol, String host, int port, IServiceID serviceID) {
+ this(protocol, host, port, serviceID, new ServiceProperties());
}
public ServiceInfo(URI anURI, IServiceID serviceID, IServiceProperties props) {

Back to the top