bsh.help.stopapp = "usage: stopapp( appName ), stops the blocks for an app"; /* By Paul Hammant : Specifically for Phoenix */ stopapp( String appName ) { kernel = this.interpreter.get("phoenix-kernel"); String[] blocks = kernel.getApplication(appName).getBlockNames(); int ct =0; for (int i = 0; i < blocks.length; i++) { block = kernel.getApplication(appName).getBlock(blocks[i]); if (block instanceof org.apache.avalon.framework.activity.Startable) { block.stop(); ct++; } } print(ct + " blocks stopped for '" + appName + "'"); } stopapp( int appNo ) { kernel = this.interpreter.get("phoenix-kernel"); String[] apps = kernel.getApplicationNames(); stopapp(apps[appNo]); }