summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ActiveNodes.java32
-rw-r--r--sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java3
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java7
3 files changed, 42 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ActiveNodes.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ActiveNodes.java
new file mode 100644
index 0000000000..c3b6527181
--- /dev/null
+++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ActiveNodes.java
@@ -0,0 +1,32 @@
+/*
+ * 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.runtime;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ActiveNodes {
+
+ List<Object> activeNodes = new ArrayList<Object>();
+
+ public List<Object> getActiveNodes() {
+ return activeNodes;
+ }
+}
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java
index 08c7a5131f..08fbb62f0d 100644
--- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java
+++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java
@@ -22,6 +22,7 @@ package org.apache.tuscany.sca.runtime;
import java.util.Collection;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.Callable;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.Endpoint;
@@ -96,4 +97,6 @@ public interface DomainRegistry {
List<String> getMembers();
String getLocalMember();
String getRunningMember(String contributionURI, String compositeURI);
+
+ String remoteCommand(String memberName, Callable<String> command);
}
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
index c3ffd9091f..1af82d2272 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
@@ -26,6 +26,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
+import java.util.concurrent.Callable;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -243,4 +244,10 @@ public class DomainRegistryImpl extends BaseDomainRegistry implements DomainRegi
public String getRunningMember(String contributionURI, String compositeURI) {
return LOCAL_MEMBER_NAME;
}
+
+ @Override
+ public String remoteCommand(String memberName, Callable<String> command) {
+ // TODO or should it just ensure the member name is LocalOnly and the run the command locally?
+ throw new IllegalStateException("not supportted for " + LOCAL_MEMBER_NAME);
+ }
}