@Override public boolean invoke(String[] args) throws Exception { if (args.length != 2) { System.err.println("Wrong number of args"); System.err.println(getShortHelp()); return true; } shell.getNode().stopComposite(args[0], args[1]); return true; }
@Override public boolean invoke(String[] args) throws Exception { if (args.length != 2) { System.err.println("Wrong number of args"); System.err.println(getShortHelp()); return true; } shell.getNode().stopComposite(args[0], args[1]); return true; }
public String call() throws Exception { String response; try { Node node = getNode(); if ("start".equals(command)) { node.startComposite(contributionURI, compositeURI); response = "Started."; } else if ("stop".equals(command)) { node.stopComposite(contributionURI, compositeURI); response = "Stopped."; } else { response = "Unknown command: " + command; } } catch (Exception e) { response = "REMOTE EXCEPTION: " + e.getClass() + ":" + e.getMessage(); } return response; }
public String call() throws Exception { String response; try { Node node = getNode(); if ("start".equals(command)) { node.startComposite(contributionURI, compositeURI); response = "Started."; } else if ("stop".equals(command)) { node.stopComposite(contributionURI, compositeURI); response = "Stopped."; } else { response = "Unknown command: " + command; } } catch (Exception e) { response = "REMOTE EXCEPTION: " + e.getClass() + ":" + e.getMessage(); } return response; }