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()
ShellService
getCommands
in interface ShellService
public java.lang.String getCommandUsage(java.lang.String name)
ShellService
getCommandUsage
in interface ShellService
name
- the name of the target command.public java.lang.String getCommandDescription(java.lang.String name)
ShellService
getCommandDescription
in interface ShellService
name
- the name of the target command.public org.osgi.framework.ServiceReference getCommandReference(java.lang.String name)
ShellService
getCommandReference
in interface ShellService
name
- 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 ShellService
commandLine
- the command line to execute.out
- the standard output print stream.err
- the standard error print stream.java.lang.Exception
Command getCommand(java.lang.String name)