summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/shell/src/main/java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-19 08:48:21 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-19 08:48:21 +0000
commitce208dd59902981b9fac895a6596d0e08b065da6 (patch)
tree6d146851fb908e0a17ebdebcfe174d5a82015f42 /sca-java-2.x/trunk/modules/shell/src/main/java
parent96b8adf748b455a3004b75de9f64a80747a6b399 (diff)
Update to add APIs to get at which composites are running where
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1124606 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/shell/src/main/java')
-rw-r--r--sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java16
1 files changed, 14 insertions, 2 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 7302417236..e49ce33c64 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
@@ -473,7 +473,18 @@ public class Shell {
// if (cs != null) {
for (String curi : node.getStartedCompositeURIs().keySet()) {
for (String compositeURI : node.getStartedCompositeURIs().get(curi)) {
- out.println(" " + curi + " " + compositeURI);
+
+ String runningMember = node.getRunningMember(curi, compositeURI);
+ if (node.getLocalMember().equals(runningMember)) {
+ runningMember = "this";
+ }
+ if ("LocalOnly".equals(runningMember)) {
+ runningMember = "";
+ } else {
+ runningMember = " (" + runningMember + ")";
+ }
+
+ out.println(" " + curi + " " + compositeURI + runningMember);
}
}
// }
@@ -484,8 +495,9 @@ public class Shell {
}
boolean members() {
+ String localMember = getNode().getLocalMember();
for (String member : getNode().getMembers()) {
- out.println(member);
+ out.println(member + (localMember.equals(member) ? " (this)" : ""));
}
return true;
}