From 6488c22f990bed4927c1ec089fffeb256da15b3a Mon Sep 17 00:00:00 2001 From: antelder Date: Fri, 20 May 2011 07:03:12 +0000 Subject: Remove remoteStart/Stop commands to simplify - don't need remoteStop as stop can see that the composte is running remotely and for start just overload the start command to take a member name to run the composite on git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1125259 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/tuscany/sca/shell/Shell.java | 30 ++++++---------------- 1 file changed, 8 insertions(+), 22 deletions(-) (limited to 'sca-java-2.x/trunk/modules/shell/src/main/java/org') 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 a407f3e105..d5b2e6ee44 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[] {"bye", "domain", "domains", "domainComposite", "help", "install", "installed", "invoke", - "load", "members", "remoteStart", "remoteStop", "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; @@ -444,14 +444,8 @@ public class Shell { return true; } - boolean remoteStart(final List toks) { - String response = getNode().remoteStart(toks.get(1), toks.get(2), toks.get(3)); - out.println(response); - return true; - } - boolean remoteStop(final List toks) { - String response = getNode().remoteStop(toks.get(1), toks.get(2), toks.get(3)); - out.println(response); + boolean remoteStart(String member, String contributionURI, String compositeURI) throws ActivationException { + getNode().startComposite(member, contributionURI, compositeURI); return true; } @@ -673,23 +667,15 @@ public class Shell { return bye(); } }; - if (op.equalsIgnoreCase("remoteStart")) - return new Callable() { - public Boolean call() throws Exception { - return remoteStart(toks); - } - }; - if (op.equalsIgnoreCase("remoteStop")) - return new Callable() { - public Boolean call() throws Exception { - return remoteStop(toks); - } - }; if (op.equalsIgnoreCase("start")) return new Callable() { public Boolean call() throws Exception { if (currentDomain.length() > 0) { - return start(toks.get(1), toks.get(2)); + if (toks.size() == 4) { + return remoteStart(toks.get(1), toks.get(2), toks.get(3)); + } else { + return start(toks.get(1), toks.get(2)); + } } else { String[] duris = null; if (toks.contains("-duris")) { -- cgit v1.2.3