diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-05-20 07:03:12 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-05-20 07:03:12 +0000 |
commit | 6488c22f990bed4927c1ec089fffeb256da15b3a (patch) | |
tree | 483e0ddcd995da8b0931a0b0c8ca53e7d7aa70b7 /sca-java-2.x/trunk/modules/shell/src/main/java/org | |
parent | fc66b50df4e07dee2dc7d363fb2b531052c97b77 (diff) |
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
Diffstat (limited to 'sca-java-2.x/trunk/modules/shell/src/main/java/org')
-rw-r--r-- | sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java | 30 |
1 files changed, 8 insertions, 22 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 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<String, Node> nodes = new HashMap<String, Node>();
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<String> toks) {
- String response = getNode().remoteStart(toks.get(1), toks.get(2), toks.get(3));
- out.println(response);
- return true;
- }
- boolean remoteStop(final List<String> 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<Boolean>() {
- public Boolean call() throws Exception {
- return remoteStart(toks);
- }
- };
- if (op.equalsIgnoreCase("remoteStop"))
- return new Callable<Boolean>() {
- public Boolean call() throws Exception {
- return remoteStop(toks);
- }
- };
if (op.equalsIgnoreCase("start"))
return new Callable<Boolean>() {
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")) {
|