diff options
author | slewis | 2005-06-17 05:58:35 +0000 |
---|---|---|
committer | slewis | 2005-06-17 05:58:35 +0000 |
commit | d50d3d68d8a0124476e3aa842b8a659c925b8043 (patch) | |
tree | 850b8b6f55f335582a85f9f35fe7cf00155932a7 | |
parent | 6661dfc8f1c3d3de01951602d04d9b52e41bcf89 (diff) | |
download | org.eclipse.ecf-d50d3d68d8a0124476e3aa842b8a659c925b8043.tar.gz org.eclipse.ecf-d50d3d68d8a0124476e3aa842b8a659c925b8043.tar.xz org.eclipse.ecf-d50d3d68d8a0124476e3aa842b8a659c925b8043.zip |
Added to basic capabilities of IServiceInfo and implementations
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("",""); + } } |