Knopflerfish OSGi 5.2.0

org.knopflerfish.service.console
Interface CommandGroup

All Known Implementing Classes:
CommandGroupAdapter

public interface CommandGroup

Interface for a command group service. This service will be used by the console service to present the commands to the user.

The service object must then be registered under the class name
org.knopflerfish.service.console.CommandGroup with the property "groupName" set to the command group name.

Author:
Gatespace AB
See Also:
CommandGroupAdapter, ConsoleService

Field Summary
static java.lang.String GROUP_NAME
          Property key for group name to use when registering a CommandGroup.
 
Method Summary
 int execute(java.lang.String[] args, java.io.Reader in, java.io.PrintWriter out, Session session)
          Executes a command in the command group.
 java.lang.String getGroupName()
          Returns a string with the command group name.
 java.lang.String getLongHelp()
          Returns a string containing a long help text for the command group.
 java.lang.String getShortHelp()
          Returns a string containing a short help text for the command group.
 

Field Detail

GROUP_NAME

static final java.lang.String GROUP_NAME
Property key for group name to use when registering a CommandGroup.

See Also:
Constant Field Values
Method Detail

getGroupName

java.lang.String getGroupName()
Returns a string with the command group name.

Returns:
Command group name.

getShortHelp

java.lang.String getShortHelp()
Returns a string containing a short help text for the command group.

Returns:
Short command group help.

getLongHelp

java.lang.String getLongHelp()
Returns a string containing a long help text for the command group.

Returns:
Long command group help.

execute

int execute(java.lang.String[] args,
            java.io.Reader in,
            java.io.PrintWriter out,
            Session session)
Executes a command in the command group. The command and its arguments are passed in the args parameter.

Parameters:
args - argument list
out - output write for command to print result to
in - input reader for command to read interactively
session - a handle to command session or null if single command
Returns:
Status from execution, 0 means okey

Knopflerfish OSGi 5.2.0