接口 CommandProcessor

  • 所有已知实现类:
    CommandProcessorImpl

    public interface CommandProcessor
    A command shell can create and maintain a number of command sessions.
    作者:
    aqute
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      static java.lang.String COMMAND_FUNCTION
      A list of method names that may be called for this command provider.
      static java.lang.String COMMAND_SCOPE
      The scope of commands provided by this service.
    • 字段详细资料

      • COMMAND_SCOPE

        static final java.lang.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.
        另请参阅:
        常量字段值
      • COMMAND_FUNCTION

        static final java.lang.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.

        另请参阅:
        常量字段值
    • 方法详细资料

      • createSession

        CommandSession createSession​(java.io.InputStream in,
                                     java.io.PrintStream out,
                                     java.io.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.

        参数:
        in - The value used for System.in
        out - The stream used for System.out
        err - The stream used for System.err
        返回:
        A new session.