Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkuppe2009-04-20 03:53:59 -0400
committermkuppe2009-04-20 03:53:59 -0400
commit6e95a9efbac86ebecaa42e6a8b591a6375270671 (patch)
treec171af046eba80b2f37d1f3211811b6032f00a49
parentc46e3e49b767ff0f4cfd012b5c87ce4dc2d716f6 (diff)
downloadorg.eclipse.ecf-6e95a9efbac86ebecaa42e6a8b591a6375270671.tar.gz
org.eclipse.ecf-6e95a9efbac86ebecaa42e6a8b591a6375270671.tar.xz
org.eclipse.ecf-6e95a9efbac86ebecaa42e6a8b591a6375270671.zip
Pass full +(authority/path/query/fragment) to EMFv20090420-0800
-rw-r--r--framework/bundles/org.eclipse.ecf.discovery.ui.model/src/org/eclipse/ecf/discovery/ui/model/resource/ServiceResource.java25
1 files changed, 15 insertions, 10 deletions
diff --git a/framework/bundles/org.eclipse.ecf.discovery.ui.model/src/org/eclipse/ecf/discovery/ui/model/resource/ServiceResource.java b/framework/bundles/org.eclipse.ecf.discovery.ui.model/src/org/eclipse/ecf/discovery/ui/model/resource/ServiceResource.java
index 80552134a..2a04cda0e 100644
--- a/framework/bundles/org.eclipse.ecf.discovery.ui.model/src/org/eclipse/ecf/discovery/ui/model/resource/ServiceResource.java
+++ b/framework/bundles/org.eclipse.ecf.discovery.ui.model/src/org/eclipse/ecf/discovery/ui/model/resource/ServiceResource.java
@@ -212,10 +212,11 @@ public class ServiceResource extends ResourceImpl implements Resource {
URI uri = uriConverter.normalize(URI.createURI(name));
// set Authority to host and port of the service
- uri = URI.createHierarchicalURI(uri.scheme(), anIServiceInfo
- .getLocation().getHost()
- + ":" + anIServiceInfo.getLocation().getPort(), null, uri //$NON-NLS-1$
- .segments(), null, null); //$NON-NLS-1$
+ final java.net.URI location = anIServiceInfo.getLocation();
+ final String authority = location.getAuthority();
+ uri = URI.createHierarchicalURI(uri.scheme(), authority, uri
+ .device(), uri.segments(), location.getQuery(), location
+ .getFragment());
return uri;
}
@@ -288,9 +289,11 @@ public class ServiceResource extends ResourceImpl implements Resource {
}
getResourceSet().getResources().removeAll(resources);
- Trace.trace(ModelPlugin.PLUGIN_ID, ModelPlugin.PLUGIN_ID
- + "/methods/tracing", ServiceResource.class, //$NON-NLS-1$
- "serviceUndiscovered", "Removed service " + emfIServiceInfo); //$NON-NLS-1$ //$NON-NLS-2$
+ Trace
+ .trace(
+ ModelPlugin.PLUGIN_ID,
+ ModelPlugin.PLUGIN_ID + "/methods/tracing", ServiceResource.class, //$NON-NLS-1$
+ "serviceUndiscovered", "Removed service " + emfIServiceInfo); //$NON-NLS-1$ //$NON-NLS-2$
// remove the host if no services left for this particular host
IHost host = findIHost(getInetAddress(ecfServiceInfo
@@ -304,7 +307,7 @@ public class ServiceResource extends ResourceImpl implements Resource {
Trace.exiting(ModelPlugin.PLUGIN_ID, ModelPlugin.PLUGIN_ID
+ "/methods/exiting", ServiceResource.class, //$NON-NLS-1$
"serviceUndiscovered", ecfEvent); //$NON-NLS-1$
- } catch(AssertionFailedException e) {
+ } catch (AssertionFailedException e) {
Trace.catching(ModelPlugin.PLUGIN_ID, ModelPlugin.PLUGIN_ID
+ "/methods/tracing", ServiceResource.class, //$NON-NLS-1$
"serviceUndiscovered", e); //$NON-NLS-1$
@@ -398,8 +401,10 @@ public class ServiceResource extends ResourceImpl implements Resource {
}
org.eclipse.ecf.discovery.IServiceInfo si1 = (org.eclipse.ecf.discovery.IServiceInfo) anObj1;
org.eclipse.ecf.discovery.IServiceInfo si2 = (org.eclipse.ecf.discovery.IServiceInfo) anObj2;
- org.eclipse.ecf.discovery.identity.IServiceID sId1 = si1.getServiceID();
- org.eclipse.ecf.discovery.identity.IServiceID sId2 = si2.getServiceID();
+ org.eclipse.ecf.discovery.identity.IServiceID sId1 = si1
+ .getServiceID();
+ org.eclipse.ecf.discovery.identity.IServiceID sId2 = si2
+ .getServiceID();
if (sId1.equals(sId2)) {
return 0;
}

Back to the top