BeanShell Commands
Currently available commands include:
| Command | Description | Aliases |
|---|---|---|
| listBasherContexts() | lsbc() | |
| printBasherContext(string basherContextName) | catbc(string basherContextName) | |
| status() | ||
| numThreads() | nt() | |
| addThread() | addt(); | |
| addThreads(int count) | addt(int count); | |
| removeThread() | rmt | |
| removeAllThreads() | rmat | |
| start() | ||
| start(string basherContextName) | ||
| stop() | ||
| shutdown() |
Importing your own commands
In order to inform Basher to import your own commands into the BeanShell interpreter runtime, simply make sure your scripts are available on the class-path and then contribute the location of your scripts (relative to the root of the classpath) to the net.sourceforge.basher.internal.BeanShellScripts configuration point.
<contribution configuration-id="net.sourceforge.basher.internal.BeanShellScripts"> <beanshell-scripts location="/mydirectory"/> </contribution>
The Basher Examples has an example of adding a command to the Basher runtime.