The console bundle actually has some built in commands that can be used for administrative tasks, that is, managing the user session. These are the commands in the command group session.
The following bundles implement user interfaces: consoletty Basic tty console, available in the terminal window where the platform is started. consoletelnet Basic telnet console, listens on a port using the telnet protocol.
First is the command group (all commands must belong to a command group), then the command. After the command is zero, one or more flags with possible additional parameters and finally zero, one or more parameters. See chapter [2]Terminology on page 1 for explanations of delimiters.[ ...] [ ...]
Note: To avoid having negative numbers interpreted as flags, negative numbers are to be written with double hyphens (as --n).
At start-up, the console is in the initial state. When entering a command the command line must begin with the command group's name, as described above. However, the session can enter a group with the session enter command. After entering a command group, commands of that group are executed without the group name as prefix. The session leave command leaves the current group and the session is back in its initial state.
Commands from other groups than the current group can be executed by prefixing the command with a slash ("/"). For example, the following would execute the shutdown command from the framework command group, regardless of the session's current group. /framework shutdown
Normally, command groups and commands may be shortened as long as they are unambiguously identifiable. As an example, in command group session, the command alias may be shortened to a as it is the only command that starts with the letter a.
All of the session commands have aliases to make them quick to enter regardless of the current command group. For example, /session help has the alias help. In all the examples below, the alias versions of the session commands are used.
The commands in the session command group are:
* alias [] [ ] ... * enter * help * leave * prompt * quit * save * unalias
alias [With parameters it sets an alias to the specified value. If the alias exists, the old value is replaced with the new. With one parameter the value of that alias is shown.] [ ] ... The command without any parameters prints a list of all existing aliases: > alias start = /framework start install = /framework install prompt = /session prompt lsb = /framework bundles fw = /session enter framework log = /log show help = /session help quit = /session quit lss = /framework services alias = /session alias unalias = /session unalias enter = /session enter stop = /framework stop bundles = /framework bundles leave = /session leave >
enterThe result is that the prompter is prefixed with the command group and all the commands in the command group are available in short form. Example: Entering a command group
> enter framework framework> help Available framework commands: bundles [-help] [-1] [-i] [-l] [It is only possible to be in one command group at a given moment. By adding a slash ("/") to the group name, commands in other gruops can be accessed.] ... - List bundles call [-help] [ ] ... - Call a method in a registered service headers [-help] ... - Show bundle header values package [-help] ... - Show java package information install [-help] [-s] ... - Install one or more bundles services [-help] [-i] [-l] [-r] [-s] [-u] [ ] ... - List registered services start [-help] ... - Start one or more bundles stop [-help] ... - Stop one or more bundles shutdown [-help] [ ] - Shutdown framework uninstall [-help] >bundle> ... - Uninstall one or more bundles update [-help] [-r] ... - Update one or more bundles
help [Lists the commands available in the specified command group, each with a short description. If no command group is specified, help for the current group is displayed. In the initial state, or if the parameter all is supplied, help shows the available command groups. Example: Display available command groups| all]
> help Available command groups: session - Session commands built into the console logconfig - Configuration commands for the log. log - Log commands framework - Framework commands >Note that this list can be longer as any installed bundle can export its own commands.
leaveExample: Leave the current command group
framework> leave >Note that leave only goes to the initial state, it does not go to the previous command group, if any.
promptIf the command group is to be visible in the prompt, a percent character ("%") should be included in the prompt string. At printout, the % character will be replaced by the command group name. Example: Changing the prompter
> prompt "%test >" test > enter framework frameworktest >
quitThe console exits and loses contact with standard in.
unaliasExample: Creating and removing an alias
> alias more less > unalias more
If the platform starts the consoletty, it will use the text window the platform was started from.
> telnet demo.gatespace.se 8999 Trying 127.0.0.1... Connected to localhost.localdomain. Escape character is '^]'. > help Available command groups: session - Session commands built into the console osgilog - Log commands messenger - Messenger route configuration commands. logconfig - Configuration commands for the log. framework - Framework commands >