private class Activator.ShellServiceImpl extends java.lang.Object implements ShellService, ShellService
| Modifier | Constructor and Description |
|---|---|
private |
ShellServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
executeCommand(java.lang.String commandLine,
java.io.PrintStream out,
java.io.PrintStream err)
This method executes the supplied command line using the
supplied output and error print stream.
|
(package private) Command |
getCommand(java.lang.String name) |
java.lang.String |
getCommandDescription(java.lang.String name)
Returns the description associated with the specified command name.
|
org.osgi.framework.ServiceReference |
getCommandReference(java.lang.String name)
Returns the service reference associated with the specified
command name.
|
java.lang.String[] |
getCommands()
Returns an array of command names available in the impl service.
|
java.lang.String |
getCommandUsage(java.lang.String name)
Returns the usage string associated with the specified command name.
|
public java.lang.String[] getCommands()
ShellServicegetCommands in interface ShellServicepublic java.lang.String getCommandUsage(java.lang.String name)
ShellServicegetCommandUsage in interface ShellServicename - the name of the target command.public java.lang.String getCommandDescription(java.lang.String name)
ShellServicegetCommandDescription in interface ShellServicename - the name of the target command.public org.osgi.framework.ServiceReference getCommandReference(java.lang.String name)
ShellServicegetCommandReference in interface ShellServicename - the name of the target command.public void executeCommand(java.lang.String commandLine,
java.io.PrintStream out,
java.io.PrintStream err)
throws java.lang.Exception
ShellService
update 3 http://www.foo.com/bar.jar
This is interpretted as an update command; as a result, the entire command line (include command name) is passed into the execute() method of the command service with the name update if one exists. If the corresponding command service is not found, then an error message is printed to the error print stream.
executeCommand in interface ShellServicecommandLine - the command line to execute.out - the standard output print stream.err - the standard error print stream.java.lang.ExceptionCommand getCommand(java.lang.String name)