New pluggable console commands.
When you start up the microservice, you'll now see the following:
Running class 'RestMicroservice' using config file 'examples.cfg'.
Server started on port 10000
List of available commands:
exit -- Shut down service
restart -- Restarts service
help -- Commands help
echo -- Echo command
> help help
NAME
help -- Commands help
SYNOPSIS
help [command]
DESCRIPTION
When called without arguments, prints the descriptions of all available commands.
Can also be called with one or more arguments to get detailed information on a command.
EXAMPLES
List all commands:
> help
List help on the help command:
> help help
>
Commands are pluggable and extensible through the config file.
#=======================================================================================================================
# Console settings
#=======================================================================================================================
[Console]
enabled = true
# List of available console commands.
# These are classes that implements ConsoleCommand that allow you to submit commands to the microservice via
# the console.
# When listed here, the implementations must provide a no-arg constructor.
# They can also be provided dynamically by overriding the Microservice.createConsoleCommands() method.
commands =
org.apache.juneau.microservice.console.ExitCommand,
org.apache.juneau.microservice.console.RestartCommand,
org.apache.juneau.microservice.console.HelpCommand
- New classes:
- {@link oaj.microservice.console.ConsoleCommand}
- {@link oaj.microservice.console.ExitCommand}
- {@link oaj.microservice.console.RestartCommand}
- {@link oaj.microservice.console.HelpCommand}
- New methods on {@link oaj.microservice.Microservice}
- {@link oaj.microservice.Microservice#startConsole() startConsole()}
createConsoleCommands()
- {@link oaj.microservice.Microservice#getConsoleReader() getConsoleReader()}
- {@link oaj.microservice.Microservice#getConsoleWriter() getConsoleWriter()}