diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-12-13 09:17:42 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-12-13 09:17:42 +0000 |
commit | c405cdf7ba36ed485d38395011b36cb882f94d27 (patch) | |
tree | e93a426276086d85b4b749f121a7dc5ed5727f9e /sca-java-2.x/trunk/modules | |
parent | 85f90ebf75f291f8cf5b3aa045ea8174514ce4fa (diff) |
Update core to use the Tuscany versions of the OASIS interfaces ComponentCOntext and ServiceReference
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1213617 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
2 files changed, 7 insertions, 6 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/ServiceReferenceExt.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/ServiceReferenceExt.java index 5206f0945e..5856ab114b 100644 --- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/ServiceReferenceExt.java +++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/ServiceReferenceExt.java @@ -22,12 +22,12 @@ package org.apache.tuscany.sca.core.context; import java.io.Externalizable; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; -import org.oasisopen.sca.ServiceReference; +import org.apache.tuscany.sca.runtime.TuscanyServiceReference; /** * Extended ServiceReference */ -public interface ServiceReferenceExt<B> extends ServiceReference<B>, Externalizable { +public interface ServiceReferenceExt<B> extends TuscanyServiceReference<B>, Externalizable { /** * Return the EndpointReference that sits behind this service reference diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java index db12ed14d9..18587b2f6d 100644 --- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java +++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java @@ -53,6 +53,7 @@ import org.apache.tuscany.sca.runtime.RuntimeComponentContext; import org.apache.tuscany.sca.runtime.RuntimeComponentReference; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; +import org.apache.tuscany.sca.runtime.TuscanyServiceReference; import org.oasisopen.sca.RequestContext; import org.oasisopen.sca.ServiceReference; import org.oasisopen.sca.ServiceRuntimeException; @@ -116,7 +117,7 @@ public class ComponentContextImpl implements RuntimeComponentContext { return service; } - public <B> ServiceReference<B> getServiceReference(Class<B> businessInterface, String referenceName) + public <B> TuscanyServiceReference<B> getServiceReference(Class<B> businessInterface, String referenceName) throws IllegalArgumentException { for (ComponentReference ref : component.getReferences()) { @@ -130,7 +131,7 @@ public class ComponentContextImpl implements RuntimeComponentContext { if (ref.getEndpointReferences().size() < 1) { return null; } - ServiceReference<B> sr = + TuscanyServiceReference<B> sr = getServiceReference(businessInterface, (RuntimeEndpointReference)getEndpointReference(ref)); if (sr == null) { throw new IllegalArgumentException("Reference " + referenceName + " is null"); @@ -323,9 +324,9 @@ public class ComponentContextImpl implements RuntimeComponentContext { * @throws CloneNotSupportedException * @throws InvalidInterfaceException */ - public <B> ServiceReference<B> getServiceReference(Class<B> businessInterface, + public <B> TuscanyServiceReference<B> getServiceReference(Class<B> businessInterface, RuntimeEndpointReference endpointReference) { - ServiceReference<B> result = null; + TuscanyServiceReference<B> result = null; try { InterfaceContract interfaceContract = endpointReference.getComponentTypeReferenceInterfaceContract(); |