diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-08 21:50:12 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-08 21:50:12 +0000 |
commit | d8ba56c6764d782f22682189efce1416a3cf0d77 (patch) | |
tree | 92269b20a4570266146d4751a881408dd9693bef /java/sca/modules/assembly | |
parent | 6ebe0961b2ec3b32b261a0965515fb91a443a008 (diff) |
Move EndpointRegistry from assembly to core-spi
Add EndpointListener
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@782804 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/assembly')
2 files changed, 0 insertions, 125 deletions
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointRegistry.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointRegistry.java deleted file mode 100644 index ef63ac781a..0000000000 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointRegistry.java +++ /dev/null @@ -1,36 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.assembly;
-
-import java.util.List;
-
-import org.apache.tuscany.sca.assembly.Endpoint2;
-import org.apache.tuscany.sca.assembly.EndpointReference2;
-
-public interface EndpointRegistry {
- void addEndpoint(Endpoint2 endpoint);
- void removeEndpoint(Endpoint2 endpoint);
- void addEndpointReference(EndpointReference2 endpointReference);
- void removeEndpointReference(EndpointReference2 endpointReference);
- List<Endpoint2> findEndpoint(EndpointReference2 endpointReference);
- List<EndpointReference2> findEndpointReference(Endpoint2 endpoint);
- List<Endpoint2> getEndpoints();
- List<EndpointReference2> getEndpointRefereneces();
-}
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointRegistryImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointRegistryImpl.java deleted file mode 100644 index f5cc99d167..0000000000 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointRegistryImpl.java +++ /dev/null @@ -1,89 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.assembly.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.tuscany.sca.assembly.ComponentService;
-import org.apache.tuscany.sca.assembly.Endpoint2;
-import org.apache.tuscany.sca.assembly.EndpointReference2;
-import org.apache.tuscany.sca.assembly.EndpointRegistry;
-
-public class EndpointRegistryImpl implements EndpointRegistry {
-
- public static final EndpointRegistryImpl INSTANCE = new EndpointRegistryImpl();
- public static EndpointRegistryImpl getInstance() {
- return INSTANCE;
- }
-
- List<Endpoint2> endpoints = new ArrayList<Endpoint2>();
- List<EndpointReference2> endpointreferences = new ArrayList<EndpointReference2>();
-
- private EndpointRegistryImpl() {
- }
-
- public void addEndpoint(Endpoint2 endpoint) {
- endpoints.add(endpoint);
- }
-
- public void addEndpointReference(EndpointReference2 endpointReference) {
- endpointreferences.add(endpointReference);
- }
-
- public List<Endpoint2> findEndpoint(EndpointReference2 endpointReference) {
- List<Endpoint2> foundEndpoints = new ArrayList<Endpoint2>();
- if (endpointReference.getReference() != null) {
- List<ComponentService> targets = endpointReference.getReference().getTargets();
- if (targets != null) {
- for (ComponentService targetService : targets) {
- for (Endpoint2 endpoint : endpoints) {
- // TODO: implement more complete matching
- if (endpoint.getComponent().getName().equals(targetService.getName())) {
- foundEndpoints.add(endpoint);
- }
- }
- }
- }
- }
- return foundEndpoints;
- }
-
- public List<EndpointReference2> findEndpointReference(Endpoint2 endpoint) {
- return null;
- }
-
- public void removeEndpoint(Endpoint2 endpoint) {
- endpoints.remove(endpoint);
- }
-
- public void removeEndpointReference(EndpointReference2 endpointReference) {
- endpointreferences.remove(endpointReference);
- }
-
- public List<EndpointReference2> getEndpointRefereneces() {
- return endpointreferences;
- }
-
- public List<Endpoint2> getEndpoints() {
- return endpoints;
- }
-
-}
|