summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-03-16 08:00:39 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-03-16 08:00:39 +0000
commit0d9b8d05c6d510427e92b891020fdf183572f09f (patch)
treeb78672d0c839a45024a7c04e98b8d35fddc6f70d /sca-java-2.x
parentb7878c6d14b81b7877ff448727ac4b3d54e74cbd (diff)
Remove old matches method code as its now in Endpoint class
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@923617 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x')
-rw-r--r--sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseEndpointRegistry.java72
1 files changed, 0 insertions, 72 deletions
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseEndpointRegistry.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseEndpointRegistry.java
index d45631d576..c1e0dbc45f 100644
--- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseEndpointRegistry.java
+++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseEndpointRegistry.java
@@ -116,78 +116,6 @@ public abstract class BaseEndpointRegistry implements EndpointRegistry, LifeCycl
return listeners;
}
- /**
- * Check if a serviceURI matches the given endpoint URI
- * @param serviceURI
- * @param endpointURI
- * @return
- */
- protected boolean matches(String serviceURI, String endpointURI) {
- String[] parts1 = parseServiceURI(serviceURI);
- String[] parts2 = parseStructuralURI(endpointURI);
- for (int i = 0; i < parts1.length; i++) {
- if (parts1[i] == null || parts1[i].equals(parts2[i])) {
- continue;
- } else {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Parse the service URI into an array of names. The service URI is in one of the following formats:
- * <ul>
- * <li>componentName
- * <li>componentName/serviceName
- * <li>componentName/serviceName/bindingName
- * </ul>
- * @param serviceURI
- * @return
- */
- protected String[] parseServiceURI(String serviceURI) {
- if (serviceURI.contains("#")) {
- return parseStructuralURI(serviceURI);
- }
- String[] names = new String[3];
- String[] segments = serviceURI.split("/");
- for (int i = 0; i < names.length && i < segments.length; i++) {
- names[i] = segments[i];
- }
- return names;
- }
-
- /**
- * Parse the structural URI into an array of parts (componentURI, serviceName, bindingName)
- * @param structuralURI
- * @return [0]: componentURI [1]: serviceName [2]: bindingName
- */
- protected String[] parseStructuralURI(String structuralURI) {
- String[] names = new String[3];
- int index = structuralURI.lastIndexOf('#');
- if (index == -1) {
- names[0] = structuralURI;
- } else {
- names[0] = structuralURI.substring(0, index);
- String str = structuralURI.substring(index + 1);
- if (str.startsWith("service-binding(") && str.endsWith(")")) {
- str = str.substring("service-binding(".length(), str.length() - 1);
- String[] parts = str.split("/");
- if (parts.length != 2) {
- throw new IllegalArgumentException("Invalid service-binding URI: " + structuralURI);
- }
- names[1] = parts[0];
- names[2] = parts[1];
- } else if (str.startsWith("service(") && str.endsWith(")")) {
- str = str.substring("service(".length(), str.length() - 1);
- names[1] = str;
- } else {
- throw new IllegalArgumentException("Invalid structural URI: " + structuralURI);
- }
- }
- return names;
- }
-
public abstract void removeEndpoint(Endpoint endpoint);
public void removeEndpointReference(EndpointReference endpointReference) {