Package org.apache.felix.service.command

# Interface CommandProcessor

All Known Implementing Classes:
  `CommandProcessorImpl`

public interface CommandProcessor
A command shell can create and maintain a number of command sessions.

Author:
  aqute

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`COMMAND_FUNCTION`
A list of method names that may be called for this command provider.
`static final String`
`COMMAND_SCOPE`
The scope of commands provided by this service.

## Method Summary

Modifier and Type
Method
Description
`CommandSession`
`createSession(InputStream in, PrintStream out, PrintStream err)`
Create a new command session associated with IO streams.

## Field Details

### COMMAND_SCOPE

static final String COMMAND_SCOPE
The scope of commands provided by this service. This name can be used to distinguish between different command providers with the same function names.

See Also:
  - Constant Field Values

### COMMAND_FUNCTION

static final String COMMAND_FUNCTION
A list of method names that may be called for this command provider. A name may end with a *, this will then be calculated from all declared public methods in this service.

Help information for the command may be supplied with a space as separation.

See Also:
  - Constant Field Values

## Method Details

### createSession

CommandSession createSession(InputStream in, PrintStream out, PrintStream err)
Create a new command session associated with IO streams.

The session is bound to the life cycle of the bundle getting this service. The session will be automatically closed when this bundle is stopped or the service is returned.

The shell will provide any available commands to this session and can set additional variables.

Parameters:
  `in` - The value used for System.in
  `out` - The stream used for System.out
  `err` - The stream used for System.err
Returns:
  A new session.