private void initCmdInterface(String[] completionPrefixes, History history) throws IOException { completionPrefixes = completionPrefixes == null ? getCompletionPrefixes() : completionPrefixes; cmdInterface = new CLICommandInterface(ctx); for (String s : completionPrefixes) { cmdInterface.addPrefix(s); } cmdInterface.addPrefix("org.jpos.q2.cli.builtin."); if (terminal != null) { reader = buildReader(terminal, completionPrefixes, history); ctx.setReader(reader); } }
public void exec(CLIContext cli, String[] args) { cli.println(Q2.getVersionString()); } }
protected void initService () throws Exception { Element e = getPersist (); QFactory factory = getServer().getFactory(); sm = (SMAdapter) factory.newInstance (getImpl ()); factory.setLogger (sm, e); factory.setConfiguration (sm, e); }
@Override public void exec(CLIContext ctx, String[] args) throws Exception { Q2 q2 = ctx.getCLI().getQ2(); File deployDir = q2.getDeployDir(); ctx.println(printDirectoryTree(deployDir)); return; }
public static String getRelease() { return getVersion() + " " + getRevision(); } public static String getAppVersionString() {
public QFactory getFactory () { return getServer().getFactory (); }
@Override public QClassLoader getLoader() { return server.getLoader(); }
private String getRevision() { return Q2.getRevision(); } private String getLocalHost () {
@Override public void stop(BundleContext context) throws Exception { if (q2 != null) q2.stop(); } }
private void deployInternal() throws IOException, JDOMException, SAXException, ISOException, GeneralSecurityException { extractCfg(); extractDeploy(); } private void extractCfg() throws IOException {
public QBeanSupport () { super(); setLogger (Q2.LOGGER_NAME); state = -1; }
@Override public Element getPersist () { setModified (false); return persist; }
public void exec(CLIContext ctx, String[] strings) throws Exception { ctx.setStopped(true); } }