From 835a1f814cc883179ca76fc3071a21e14c339d0f Mon Sep 17 00:00:00 2001 From: antelder Date: Tue, 7 Jun 2011 13:20:43 +0000 Subject: Rename 'member' to 'node' as it seems too confusing to try to have a different name for it git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1132994 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/tuscany/sca/shell/Shell.java | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'sca-java-2.x/trunk/modules/shell/src/main/java/org/apache') 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 4345f3732e..2d91e64d49 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 nodes = new HashMap(); public static final String[] COMMANDS = new String[] {"addComposite", "bye", "domain", "domains", "domainComposite", "help", "install", "installed", "invoke", - "load", "members", "remove", "run", "save", "services", "start", "started", "stop"}; + "load", "nodes", "remove", "run", "save", "services", "start", "started", "stop"}; public static void main(final String[] args) throws Exception { boolean useJline = true; @@ -451,8 +451,8 @@ public class Shell { return true; } - boolean remoteStart(String contributionURI, String compositeURI, String member) throws ActivationException { - getNode().startComposite(member, contributionURI, compositeURI); + boolean remoteStart(String contributionURI, String compositeURI, String nodeName) throws ActivationException { + getNode().startComposite(nodeName, contributionURI, compositeURI); return true; } @@ -487,17 +487,17 @@ public class Shell { for (String curi : node.getStartedCompositeURIs().keySet()) { for (String compositeURI : node.getStartedCompositeURIs().get(curi)) { - String runningMember = node.getRunningMember(curi, compositeURI); - if (node.getLocalMember().equals(runningMember)) { - runningMember = "this"; + String runningNodeName = node.getRunningNodeName(curi, compositeURI); + if (node.getLocalNodeName().equals(runningNodeName)) { + runningNodeName = "this"; } - if ("LocalOnly".equals(runningMember)) { - runningMember = ""; + if ("LocalOnly".equals(runningNodeName)) { + runningNodeName = ""; } else { - runningMember = " (" + runningMember + ")"; + runningNodeName = " (" + runningNodeName + ")"; } - out.println(" " + curi + " " + compositeURI + runningMember); + out.println(" " + curi + " " + compositeURI + runningNodeName); } } // } @@ -507,10 +507,10 @@ public class Shell { return true; } - boolean members() { - String localMember = getNode().getLocalMember(); - for (String member : getNode().getMembers()) { - out.println(member + (localMember.equals(member) ? " (this)" : "")); + boolean nodes() { + String localNode = getNode().getLocalNodeName(); + for (String node : getNode().getNodeNames()) { + out.println(node + (localNode.equals(node) ? " (this)" : "")); } return true; } @@ -632,10 +632,10 @@ public class Shell { return load(toks.get(1)); } }; - if (op.equalsIgnoreCase("members")) + if (op.equalsIgnoreCase("nodes")) return new Callable() { public Boolean call() throws Exception { - return members(); + return nodes(); } }; if (op.equalsIgnoreCase("remove")) @@ -814,12 +814,12 @@ public class Shell { out.println(" installed []"); out.println(" invoke [/] [ ...]"); out.println(" load "); - out.println(" members"); + out.println(" nodes"); out.println(" remove "); out.println(" run "); out.println(" save "); out.println(" services"); - out.println(" start []"); + out.println(" start []"); out.println(" started"); out.println(" status"); out.println(" stop "); -- cgit v1.2.3