|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ShellService
This interface defines the Felix impl service. The impl service is an extensible, user interface neutral impl for controlling and interacting with the framework. In general, the impl service assumes that it is operating in a command line fashion, i.e., it receives a complete command line, parses it, and executes the corresponding command, but graphical interfaces are also possible.
All commands in the impl service are actually implemented as OSGi services; these services implement the Command service interface. Any bundle can implement custom commands by creating command services and registering them with the OSGi framework.
Method Summary | |
---|---|
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. |
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. |
Method Detail |
---|
java.lang.String[] getCommands()
java.lang.String getCommandUsage(java.lang.String name)
name
- the name of the target command.
java.lang.String getCommandDescription(java.lang.String name)
name
- the name of the target command.
org.osgi.framework.ServiceReference getCommandReference(java.lang.String name)
name
- the name of the target command.
void executeCommand(java.lang.String commandLine, java.io.PrintStream out, java.io.PrintStream err) throws java.lang.Exception
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.
commandLine
- the command line to execute.out
- the standard output print stream.err
- the standard error print stream.
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |