summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java30
-rw-r--r--java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java13
2 files changed, 0 insertions, 43 deletions
diff --git a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
index 98d450210f..fdf6f18e7b 100644
--- a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
+++ b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
@@ -19,7 +19,6 @@
package org.apache.tuscany.sca.node.impl;
-import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -28,8 +27,6 @@ import org.apache.tuscany.sca.assembly.Component;
import org.apache.tuscany.sca.assembly.ComponentService;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.CompositeService;
-import org.apache.tuscany.sca.assembly.Endpoint2;
-import org.apache.tuscany.sca.assembly.Service;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.core.assembly.ActivationException;
@@ -41,7 +38,6 @@ import org.apache.tuscany.sca.node.NodeFinder;
import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
import org.apache.tuscany.sca.runtime.RuntimeComponentContext;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
import org.oasisopen.sca.CallableReference;
import org.oasisopen.sca.ServiceReference;
import org.oasisopen.sca.ServiceRuntimeException;
@@ -208,30 +204,4 @@ public class NodeImpl implements Node, Client {
return manager.getExtensionPoints();
}
- /**
- * Get the service endpoints in this Node
- * TODO: needs review, works for the very simple testcase but i expect there are
- * other endpoints to be included
- */
- public List<Endpoint2> getServiceEndpoints() {
- List<Endpoint2> endpoints = new ArrayList<Endpoint2>();
- if (compositeActivator != null) {
- Composite domainComposite = compositeActivator.getDomainComposite();
- if (domainComposite != null) {
- for (Composite composite : domainComposite.getIncludes()) {
- for (Component component : composite.getComponents()) {
- for (Service service : component.getServices()) {
- // MJE 28/05/2009 - changed to RuntimeComponentService from RuntimeComponentServiceImpl
- // - no need to access the Impl directly here
- if (service instanceof RuntimeComponentService) {
- endpoints.addAll(((RuntimeComponentService)service).getEndpoints());
- }
- }
- }
- }
- }
- }
- return endpoints;
- }
-
}
diff --git a/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java b/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java
index e24bd73d5e..da869e78e6 100644
--- a/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java
+++ b/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java
@@ -23,9 +23,7 @@ import hello.HelloWorld;
import java.io.File;
import java.io.StringReader;
-import java.util.List;
-import org.apache.tuscany.sca.assembly.Endpoint2;
import org.apache.tuscany.sca.node.Contribution;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
@@ -77,17 +75,6 @@ public class NodeImplTestCase {
testNode(new NodeFactoryImpl().createNode());
}
- @Test
- public void testGetServiceEndpoints() {
- NodeFactory factory = new NodeFactoryImpl();
- Contribution contribution = new Contribution("c1", new File("target/test-classes").toURI().toString());
- NodeImpl node = (NodeImpl)factory.createNode(new StringReader(composite), contribution);
- node.start();
- List<Endpoint2> endpoints = node.getServiceEndpoints();
- Assert.assertEquals(1, endpoints.size());
- Assert.assertEquals("/HelloWorld2", endpoints.get(0).getBinding().getURI());
- }
-
private void testNode(Node node) {
node.start();
HelloWorld hw = node.getService(HelloWorld.class, "HelloWorld");