Knopflerfish OSGi 5.2.0

org.knopflerfish.service.console
Interface ConsoleService


public interface ConsoleService

Console service for OSG platforms. This service is meant for building an extensible debug console for OSG systems. The ConsoleService has two methods one for running a single command and one for running a session of commands. The console service can execute any command from all the exported CommandGroup services in the platform.

Version:
$Revision: 1.1.1.1 $
Author:
Gatespace AB

Method Summary
 java.lang.String runCommand(java.lang.String command)
          Run a command string.
 Session runSession(java.lang.String name, java.io.Reader in, java.io.PrintWriter out)
          Start a command session.
 java.lang.String[] setAlias(java.lang.String key, java.lang.String[] val)
          Set alias value for a shortcut key.
 

Method Detail

runSession

Session runSession(java.lang.String name,
                   java.io.Reader in,
                   java.io.PrintWriter out)
                   throws java.io.IOException
Start a command session. Returns a Session object that can be used to control the session.

Parameters:
name - name of session
in - input to session
out - output from session
Returns:
Session object
Throws:
java.io.IOException - if we fail to use input or output

runCommand

java.lang.String runCommand(java.lang.String command)
Run a command string. Here we can only execute a single command. There is no possibility to supply any input data other than command line options and the output from the command is returned as a string. The return value from the command is discarded.

Parameters:
command - command and arguments as string
Returns:
Resulting output of command

setAlias

java.lang.String[] setAlias(java.lang.String key,
                            java.lang.String[] val)
Set alias value for a shortcut key.


Knopflerfish OSGi 5.2.0