Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2011-01-04 22:28:43 -0500
committerslewis2011-01-04 22:28:43 -0500
commit140ee7659b48c4e1a62476f935e9eaec5f5b10d4 (patch)
treec76e3c0d01751b2d6140c2db8d3634b2346a06d5 /incubation
parent0e1ed547a1490ddba7f9babbd42f83f11f3366be (diff)
downloadorg.eclipse.ecf-140ee7659b48c4e1a62476f935e9eaec5f5b10d4.tar.gz
org.eclipse.ecf-140ee7659b48c4e1a62476f935e9eaec5f5b10d4.tar.xz
org.eclipse.ecf-140ee7659b48c4e1a62476f935e9eaec5f5b10d4.zip
rsa simplifications
Diffstat (limited to 'incubation')
-rw-r--r--incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/IDUtil.java7
-rw-r--r--incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/ConsumerContainerSelector.java5
-rw-r--r--incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescription.java21
-rw-r--r--incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java9
4 files changed, 17 insertions, 25 deletions
diff --git a/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/IDUtil.java b/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/IDUtil.java
index 8532e35ce..609520eef 100644
--- a/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/IDUtil.java
+++ b/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/IDUtil.java
@@ -18,7 +18,6 @@ import org.eclipse.ecf.core.identity.IDFactory;
import org.eclipse.ecf.core.identity.IIDFactory;
import org.eclipse.ecf.core.identity.Namespace;
import org.eclipse.ecf.core.identity.StringID;
-import org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescription;
public class IDUtil {
@@ -74,12 +73,6 @@ public class IDUtil {
return getIDFactory().createID(namespace, idName);
}
- public static ID createID(EndpointDescription endpointDescription)
- throws IDCreateException {
- return createID(endpointDescription.getIdNamespace(),
- endpointDescription.getId());
- }
-
public static ID createID(Namespace namespace, Object[] args)
throws IDCreateException {
return getIDFactory().createID(namespace, args);
diff --git a/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/ConsumerContainerSelector.java b/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/ConsumerContainerSelector.java
index 959ef022e..078392398 100644
--- a/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/ConsumerContainerSelector.java
+++ b/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/ConsumerContainerSelector.java
@@ -10,7 +10,6 @@
package org.eclipse.ecf.osgi.services.remoteserviceadmin;
import org.eclipse.ecf.core.identity.ID;
-import org.eclipse.ecf.internal.osgi.services.remoteserviceadmin.IDUtil;
import org.eclipse.ecf.remoteservice.IRemoteServiceContainer;
public class ConsumerContainerSelector extends
@@ -27,7 +26,7 @@ public class ConsumerContainerSelector extends
trace("selectConsumerContainers", "endpointDescription=" + endpointDescription); //$NON-NLS-1$
// Get the endpointID
- ID endpointID = IDUtil.createID(endpointDescription);
+ ID endpointContainerID = endpointDescription.getContainerID();
String[] remoteSupportedConfigs = (String[]) endpointDescription
.getProperties()
@@ -37,7 +36,7 @@ public class ConsumerContainerSelector extends
ID connectTargetID = endpointDescription.getConnectTargetID();
IRemoteServiceContainer rsContainer = selectExistingConsumerContainer(
- endpointID, remoteSupportedConfigs, connectTargetID);
+ endpointContainerID, remoteSupportedConfigs, connectTargetID);
// If we haven't found any existing containers then we create one
// from the remoteSupportedConfigs...*iff* autoCreateContainer is
diff --git a/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescription.java b/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescription.java
index 2e484ca84..48b67d1bb 100644
--- a/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescription.java
+++ b/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/EndpointDescription.java
@@ -89,7 +89,8 @@ public class EndpointDescription extends
return IDUtil.createID(idNamespace, idName);
} catch (IDCreateException e) {
IllegalArgumentException iae = new IllegalArgumentException(
- "idName is not an ID: " + idName);
+ "cannot create a valid ID: idNamespace=" + idNamespace
+ + ", idName=" + idName);
iae.initCause(e);
throw iae;
}
@@ -106,16 +107,16 @@ public class EndpointDescription extends
return null;
List<ID> results = new ArrayList();
String idNamespace = getIdNamespace();
- try {
- for (String idName : idNames)
+ for (String idName : idNames) {
+ try {
results.add(IDUtil.createID(idNamespace, idName));
- } catch (IDCreateException e) {
- IllegalArgumentException iae = new IllegalArgumentException(
- "property value is not an ID[]: "
- + RemoteConstants.ENDPOINT_IDFILTER_IDS);
- iae.initCause(e);
- throw iae;
-
+ } catch (IDCreateException e) {
+ IllegalArgumentException iae = new IllegalArgumentException(
+ "cannot create ID[]: idNamespace=" + idNamespace
+ + " idName=" + idName);
+ iae.initCause(e);
+ throw iae;
+ }
}
return (ID[]) results.toArray(new ID[results.size()]);
}
diff --git a/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java b/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java
index 8dab194e9..74699ffd4 100644
--- a/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java
+++ b/incubation/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java
@@ -34,7 +34,6 @@ import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.core.util.ECFException;
import org.eclipse.ecf.internal.osgi.services.remoteserviceadmin.Activator;
import org.eclipse.ecf.internal.osgi.services.remoteserviceadmin.DebugOptions;
-import org.eclipse.ecf.internal.osgi.services.remoteserviceadmin.IDUtil;
import org.eclipse.ecf.internal.osgi.services.remoteserviceadmin.LogUtility;
import org.eclipse.ecf.internal.osgi.services.remoteserviceadmin.PropertiesUtil;
import org.eclipse.ecf.remoteservice.IOSGiRemoteServiceContainerAdapter;
@@ -1719,14 +1718,14 @@ public class RemoteServiceAdmin implements
// namespace for creating ID, or no namespace is present in
// endpointDescription or endpoint id,
// then it will be caught by the caller
- ID endpointID = IDUtil.createID(endpointDescription);
- Assert.isNotNull(endpointID);
+ ID endpointContainerID = endpointDescription.getContainerID();
+ Assert.isNotNull(endpointContainerID);
// Get connect target ID. May be null
ID targetID = endpointDescription.getConnectTargetID();
if (targetID == null)
- targetID = endpointID;
+ targetID = endpointContainerID;
// Get idFilter...also may be null
- ID[] idFilter = getIDFilter(endpointDescription, endpointID);
+ ID[] idFilter = getIDFilter(endpointDescription, endpointContainerID);
// Get remote service filter
String rsFilter = getRemoteServiceFilter(endpointDescription);
// IRemoteServiceReferences from query

Back to the top