Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2005-06-17 05:58:35 +0000
committerslewis2005-06-17 05:58:35 +0000
commitd50d3d68d8a0124476e3aa842b8a659c925b8043 (patch)
tree850b8b6f55f335582a85f9f35fe7cf00155932a7 /framework/bundles/org.eclipse.ecf.discovery/src
parent6661dfc8f1c3d3de01951602d04d9b52e41bcf89 (diff)
downloadorg.eclipse.ecf-d50d3d68d8a0124476e3aa842b8a659c925b8043.tar.gz
org.eclipse.ecf-d50d3d68d8a0124476e3aa842b8a659c925b8043.tar.xz
org.eclipse.ecf-d50d3d68d8a0124476e3aa842b8a659c925b8043.zip
Added to basic capabilities of IServiceInfo and implementations
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.discovery/src')
-rw-r--r--framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceInfo.java7
-rw-r--r--framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceInfo.java8
2 files changed, 14 insertions, 1 deletions
diff --git a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceInfo.java b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceInfo.java
index a84fd6857..81bd5b615 100644
--- a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceInfo.java
+++ b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceInfo.java
@@ -10,6 +10,8 @@
package org.eclipse.ecf.discovery;
import java.net.InetAddress;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.util.Map;
import org.eclipse.ecf.core.identity.ServiceID;
@@ -65,4 +67,9 @@ public interface IServiceInfo {
* @return true if this instance has been resolved, false if not
*/
public boolean isResolved();
+ /**
+ * Returns URI of service (if available). Throws URISyntaxException if
+ * existing service info cannot be used to create URI
+ */
+ public URI getServiceURI() throws URISyntaxException;
}
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 59cdb0aef..0e96209d3 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
@@ -11,6 +11,8 @@ package org.eclipse.ecf.discovery;
import java.io.Serializable;
import java.net.InetAddress;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.util.Map;
import org.eclipse.ecf.core.identity.ServiceID;
@@ -70,7 +72,7 @@ public class ServiceInfo implements IServiceInfo, Serializable {
return properties;
}
public boolean isResolved() {
- return (addr == null);
+ return (addr != null);
}
public String toString() {
StringBuffer buf = new StringBuffer("ServiceInfo[");
@@ -80,4 +82,8 @@ public class ServiceInfo implements IServiceInfo, Serializable {
properties).append("]");
return buf.toString();
}
+
+ public URI getServiceURI() throws URISyntaxException {
+ throw new URISyntaxException("","");
+ }
}

Back to the top