diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-11 16:55:44 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-11 16:55:44 +0000 |
commit | 17d2f439c3be0f7288c72846a60d42a120dce9ce (patch) | |
tree | dc5ce7563cdaf63c43c1ad45a526cf93cee0bab3 /java/sca/modules/endpoint | |
parent | 5affea192673c86fa818e69705e132b4af364c0b (diff) |
TUSCANY-3091 rename Endpoint2 and EndpointReference2 to remove the 2 subscript now they are in use full time
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@783845 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/endpoint')
2 files changed, 38 insertions, 38 deletions
diff --git a/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointReferenceBuilderImpl.java b/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointReferenceBuilderImpl.java index 093fba6446..201749e380 100644 --- a/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointReferenceBuilderImpl.java +++ b/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointReferenceBuilderImpl.java @@ -25,8 +25,8 @@ import java.util.List; import org.apache.tuscany.sca.assembly.AssemblyFactory; import org.apache.tuscany.sca.assembly.Binding; import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Endpoint2; -import org.apache.tuscany.sca.assembly.EndpointReference2; +import org.apache.tuscany.sca.assembly.Endpoint; +import org.apache.tuscany.sca.assembly.EndpointReference; import org.apache.tuscany.sca.assembly.OptimizableBinding; import org.apache.tuscany.sca.assembly.SCABinding; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; @@ -167,8 +167,8 @@ public class EndpointReferenceBuilderImpl implements CompositeBuilder, EndpointR * @param endpoint * @param monitor */ - public void build(EndpointReference2 endpointReference, Monitor monitor) { - Endpoint2 endpoint = endpointReference.getTargetEndpoint(); + public void build(EndpointReference endpointReference, Monitor monitor) { + Endpoint endpoint = endpointReference.getTargetEndpoint(); if (endpoint == null){ // an error? @@ -194,7 +194,7 @@ public class EndpointReferenceBuilderImpl implements CompositeBuilder, EndpointR // The service is in a remote composite somewhere else in the domain // find the service in the endpoint registry - List<Endpoint2> endpoints = endpointRegistry.findEndpoint(endpointReference); + List<Endpoint> endpoints = endpointRegistry.findEndpoint(endpointReference); // TODO - do we exepect to find more than one endpoint in // anything other than the autowire case? @@ -221,19 +221,19 @@ public class EndpointReferenceBuilderImpl implements CompositeBuilder, EndpointR // TODO - EPR - In OASIS case there are no bindings to match with on the // reference side. - private void matchForwardBinding(EndpointReference2 endpointReference, + private void matchForwardBinding(EndpointReference endpointReference, boolean local, Monitor monitor) { - Endpoint2 endpoint = endpointReference.getTargetEndpoint(); + Endpoint endpoint = endpointReference.getTargetEndpoint(); List<Binding> matchedReferenceBinding = new ArrayList<Binding>(); - List<Endpoint2> matchedServiceEndpoint = new ArrayList<Endpoint2>(); + List<Endpoint> matchedServiceEndpoint = new ArrayList<Endpoint>(); // Find the corresponding bindings from the service side for (Binding referenceBinding : endpointReference.getReference().getBindings()) { if (local) { - for (Endpoint2 serviceEndpoint : endpoint.getService().getEndpoints()) { + for (Endpoint serviceEndpoint : endpoint.getService().getEndpoints()) { if (referenceBinding.getClass() == serviceEndpoint.getBinding().getClass() && hasCompatiblePolicySets(referenceBinding, serviceEndpoint @@ -244,7 +244,7 @@ public class EndpointReferenceBuilderImpl implements CompositeBuilder, EndpointR } } } else { - Endpoint2 serviceEndpoint = endpoint; + Endpoint serviceEndpoint = endpoint; if (referenceBinding.getClass() == serviceEndpoint.getBinding().getClass() && hasCompatiblePolicySets(referenceBinding, serviceEndpoint .getBinding())) { @@ -278,7 +278,7 @@ public class EndpointReferenceBuilderImpl implements CompositeBuilder, EndpointR } Binding referenceBinding = matchedReferenceBinding.get(selectedBinding); - Endpoint2 serviceEndpoint = matchedServiceEndpoint.get(selectedBinding); + Endpoint serviceEndpoint = matchedServiceEndpoint.get(selectedBinding); // populate the endpoint reference try { @@ -301,7 +301,7 @@ public class EndpointReferenceBuilderImpl implements CompositeBuilder, EndpointR endpointReference.setBinding(clonedBinding); - Endpoint2 clonedEndpoint = (Endpoint2)serviceEndpoint.clone(); + Endpoint clonedEndpoint = (Endpoint)serviceEndpoint.clone(); endpointReference.setTargetEndpoint(clonedEndpoint); endpointReference.setUnresolved(false); @@ -315,7 +315,7 @@ public class EndpointReferenceBuilderImpl implements CompositeBuilder, EndpointR // TODO - EPR // Find the callback endpoint for the endpoint reference by matching // callback bindings between reference and service - private void matchCallbackBinding(EndpointReference2 endpointReference, + private void matchCallbackBinding(EndpointReference endpointReference, Monitor monitor) { // if no callback on the interface or we are creating a self reference do nothing @@ -325,17 +325,17 @@ public class EndpointReferenceBuilderImpl implements CompositeBuilder, EndpointR return; } - Endpoint2 endpoint = endpointReference.getTargetEndpoint(); + Endpoint endpoint = endpointReference.getTargetEndpoint(); - List<Endpoint2> callbackEndpoints = endpointReference.getReference().getCallbackService().getEndpoints(); - List<EndpointReference2> callbackEndpointReferences = endpoint.getCallbackEndpointReferences(); + List<Endpoint> callbackEndpoints = endpointReference.getReference().getCallbackService().getEndpoints(); + List<EndpointReference> callbackEndpointReferences = endpoint.getCallbackEndpointReferences(); - List<Endpoint2> matchedEndpoint = new ArrayList<Endpoint2>(); + List<Endpoint> matchedEndpoint = new ArrayList<Endpoint>(); if ((callbackEndpoints != null) && (callbackEndpointReferences != null)){ // Find the corresponding bindings from the service side - for (EndpointReference2 epr : callbackEndpointReferences) { - for (Endpoint2 ep : callbackEndpoints) { + for (EndpointReference epr : callbackEndpointReferences) { + for (Endpoint ep : callbackEndpoints) { if (epr.getBinding().getClass() == ep.getBinding().getClass() && hasCompatiblePolicySets(epr.getBinding(), ep.getBinding())) { diff --git a/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointRegistryImpl.java b/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointRegistryImpl.java index c57fc579c8..b291b0e44e 100644 --- a/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointRegistryImpl.java +++ b/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointRegistryImpl.java @@ -24,8 +24,8 @@ import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import java.util.logging.Logger; -import org.apache.tuscany.sca.assembly.Endpoint2; -import org.apache.tuscany.sca.assembly.EndpointReference2; +import org.apache.tuscany.sca.assembly.Endpoint; +import org.apache.tuscany.sca.assembly.EndpointReference; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.runtime.EndpointListener; import org.apache.tuscany.sca.runtime.EndpointRegistry; @@ -33,15 +33,15 @@ import org.apache.tuscany.sca.runtime.EndpointRegistry; public class EndpointRegistryImpl implements EndpointRegistry { private final Logger logger = Logger.getLogger(EndpointRegistryImpl.class.getName()); - static List<Endpoint2> endpoints = new ArrayList<Endpoint2>(); - static List<EndpointReference2> endpointreferences = new ArrayList<EndpointReference2>(); + static List<Endpoint> endpoints = new ArrayList<Endpoint>(); + static List<EndpointReference> endpointreferences = new ArrayList<EndpointReference>(); private List<EndpointListener> listeners = new CopyOnWriteArrayList<EndpointListener>(); public EndpointRegistryImpl(ExtensionPointRegistry extensionPoints) { } - public void addEndpoint(Endpoint2 endpoint) { + public void addEndpoint(Endpoint endpoint) { endpoints.add(endpoint); for (EndpointListener listener : listeners) { listener.endpointAdded(endpoint); @@ -49,7 +49,7 @@ public class EndpointRegistryImpl implements EndpointRegistry { logger.info("EndpointRegistry: Add endpoint - " + endpoint.toString()); } - public void addEndpointReference(EndpointReference2 endpointReference) { + public void addEndpointReference(EndpointReference endpointReference) { endpointreferences.add(endpointReference); logger.info("EndpointRegistry: Add endpoint reference - " + endpointReference.toString()); } @@ -98,14 +98,14 @@ public class EndpointRegistryImpl implements EndpointRegistry { return true; } - public List<Endpoint2> findEndpoint(EndpointReference2 endpointReference) { - List<Endpoint2> foundEndpoints = new ArrayList<Endpoint2>(); + public List<Endpoint> findEndpoint(EndpointReference endpointReference) { + List<Endpoint> foundEndpoints = new ArrayList<Endpoint>(); logger.info("EndpointRegistry: Find endpoint for reference - " + endpointReference.toString()); if (endpointReference.getReference() != null) { - Endpoint2 targetEndpoint = endpointReference.getTargetEndpoint(); - for (Endpoint2 endpoint : endpoints) { + Endpoint targetEndpoint = endpointReference.getTargetEndpoint(); + for (Endpoint endpoint : endpoints) { // TODO: implement more complete matching if (matches(targetEndpoint.getURI(), endpoint.getURI())) { foundEndpoints.add(endpoint); @@ -118,11 +118,11 @@ public class EndpointRegistryImpl implements EndpointRegistry { return foundEndpoints; } - public List<EndpointReference2> findEndpointReference(Endpoint2 endpoint) { + public List<EndpointReference> findEndpointReference(Endpoint endpoint) { return null; } - public void removeEndpoint(Endpoint2 endpoint) { + public void removeEndpoint(Endpoint endpoint) { endpoints.remove(endpoint); for (EndpointListener listener : listeners) { listener.endpointRemoved(endpoint); @@ -130,16 +130,16 @@ public class EndpointRegistryImpl implements EndpointRegistry { logger.info("EndpointRegistry: Remove endpoint - " + endpoint.toString()); } - public void removeEndpointReference(EndpointReference2 endpointReference) { + public void removeEndpointReference(EndpointReference endpointReference) { endpointreferences.remove(endpointReference); logger.info("EndpointRegistry: Remove endpoint reference - " + endpointReference.toString()); } - public List<EndpointReference2> getEndpointRefereneces() { + public List<EndpointReference> getEndpointRefereneces() { return endpointreferences; } - public List<Endpoint2> getEndpoints() { + public List<Endpoint> getEndpoints() { return endpoints; } @@ -155,8 +155,8 @@ public class EndpointRegistryImpl implements EndpointRegistry { listeners.remove(listener); } - public Endpoint2 getEndpoint(String uri) { - for (Endpoint2 ep : endpoints) { + public Endpoint getEndpoint(String uri) { + for (Endpoint ep : endpoints) { String epURI = ep.getComponent().getURI() + "#" + ep.getService().getName() + "/" + ep.getBinding().getName(); if (epURI.equals(uri)) { @@ -173,8 +173,8 @@ public class EndpointRegistryImpl implements EndpointRegistry { } - public void updateEndpoint(String uri, Endpoint2 endpoint) { - Endpoint2 oldEndpoint = getEndpoint(uri); + public void updateEndpoint(String uri, Endpoint endpoint) { + Endpoint oldEndpoint = getEndpoint(uri); if (oldEndpoint == null) { throw new IllegalArgumentException("Endpoint is not found: " + uri); } |