diff options
Diffstat (limited to 'src/main/resources/textFiles')
| -rw-r--r-- | src/main/resources/textFiles/consoleHelp.txt | 15 | ||||
| -rw-r--r-- | src/main/resources/textFiles/consoleScript.javascript.txt | 19 |
2 files changed, 34 insertions, 0 deletions
diff --git a/src/main/resources/textFiles/consoleHelp.txt b/src/main/resources/textFiles/consoleHelp.txt new file mode 100644 index 0000000..57a0655 --- /dev/null +++ b/src/main/resources/textFiles/consoleHelp.txt @@ -0,0 +1,15 @@ +Cristal console
+---------------
+Commands entered here are directly parsed by the beanshell engine. You can call methods directly on these pre-loaded objects:
+proxy - the EntityProxyManager
+storage - the TransactionManager
+db - the ClusterStorageManager
+lookup - the LDAPLookup (server context)
+orb - the ORB
+user - the current logged in user, or the system user if connected to the server console
+
+Built-in commands:
+log(level) - Change the log level of your stream.
+help() - View this message.
+version() - View kernel and module versions.
+shutdown() - Stop this CRISTAL instance.
diff --git a/src/main/resources/textFiles/consoleScript.javascript.txt b/src/main/resources/textFiles/consoleScript.javascript.txt new file mode 100644 index 0000000..9c68553 --- /dev/null +++ b/src/main/resources/textFiles/consoleScript.javascript.txt @@ -0,0 +1,19 @@ +function log(level) { + com.c2kernel.utils.Logger.removeLogStream(output); + com.c2kernel.utils.Logger.addLogStream(output, level); +} +function help() { + var help = com.c2kernel.utils.Resource.getAllTextResources("textFiles/consoleHelp.txt").values().iterator(); + while (help.hasNext()) + println(help.next()); +} +function version() { + print("Kernel version: "+com.c2kernel.utils.Resource.getKernelVersion()); + print("Modules loaded: "+com.c2kernel.process.Gateway.getModuleManager().getModuleVersions()); +} +function shutdown() { + if (com.c2kernel.process.AbstractMain.runningAsWrapper) + org.tanukisoftware.wrapper.WrapperManager.stop(0); + else + com.c2kernel.process.StandardClient.close(); +} |
