summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core-spi
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-19 12:21:55 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-19 12:21:55 +0000
commitc737cb99bcd1c364fe5f7f66c3662dee75ea7ae9 (patch)
tree85aa143c894131b294ce2f22c1ab722ab93bba6f /sca-java-2.x/trunk/modules/core-spi
parenta5707c170d3ce4aaecd9956cb1935305709b91d1 (diff)
Add a way to run commands on remote nodes and add Node API and Shell commands to start and stop composites on remote nodes. Initial code so a little prototypy but it does work so committing it now for review
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1124705 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core-spi')
-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
2 files changed, 35 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);
}