diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-05-19 07:13:05 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-05-19 07:13:05 +0000 |
commit | 96b8adf748b455a3004b75de9f64a80747a6b399 (patch) | |
tree | 8e233bac79083d263bae1f6aa30568b659442248 /sca-java-2.x/trunk/modules/shell/src/main | |
parent | 8a2e35b2c973cbe5ed29d419f6ffd295e709ce96 (diff) |
Add a method to get the domain members
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1124566 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/shell/src/main')
-rw-r--r-- | sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java b/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java index 7c32d47e8c..7302417236 100644 --- a/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java +++ b/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java @@ -73,7 +73,7 @@ public class Shell { private Map<String, Node> nodes = new HashMap<String, Node>();
public static final String[] COMMANDS = new String[] {"bye", "domain", "domains", "domainComposite", "help", "install", "installed", "invoke",
- "load", "remove", "run", "save", "services", "start", "started", "stop"};
+ "load", "members", "remove", "run", "save", "services", "start", "started", "stop"};
public static void main(final String[] args) throws Exception {
boolean useJline = true;
@@ -483,6 +483,13 @@ public class Shell { return true;
}
+ boolean members() {
+ for (String member : getNode().getMembers()) {
+ out.println(member);
+ }
+ return true;
+ }
+
boolean status() {
return true;
}
@@ -594,6 +601,12 @@ public class Shell { return load(toks.get(1));
}
};
+ if (op.equalsIgnoreCase("members"))
+ return new Callable<Boolean>() {
+ public Boolean call() throws Exception {
+ return members();
+ }
+ };
if (op.equalsIgnoreCase("remove"))
return new Callable<Boolean>() {
public Boolean call() throws Exception {
|