com.ibm.wsspi.zos.command.processing

Interface CommandHandler



  • public interface CommandHandler
    A CommandHandler provides the ability to receive MVS console modify commands, process them, and provide response messages for the command.

    A CommandHandler is delivered MVS console commands which match its filter. The filter value is defined via the property "modify.filter.regex".

    A MVS modify command may be issued as "f identifier,command". The "command" may consist of a command verb and optional parameters. Also, the entire "command" may be issued within quotes to preserve mixed cased characters.

    The following is an example of a MVS modify command for a CommandHandler which interacts with the OSGi ConsoleSession support: f bbgzsrv,'osgi,scr info 51'

    The "command" delivered to the CommandHandler is "osgi,scr info 51". Note that the single quotes have been removed.

    The entire "command" portion of the MVS modify command, without the enclosing quotes, if any, are passed to the CommandHandler's handleModify method.

    See Also:
    For more information on providing results of processing a MVS modify command.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String DISPLAY_HELP
      Configuration property indicating if help information should be displayed when a "general" request for help information is requested.
      static java.lang.String MODIFY_FILTER
      Configuration property identifying the regular expression used to match the command string.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.util.List<java.lang.String> getHelp()
      Return help information for this CommandHandler.
      java.lang.String getName()
      CommandHandler identity (used in command responses)
      void handleModify(java.lang.String modifyCommmand, ModifyResults results)
      This method is driven to process a MVS command which matched the modify.filter.regex.
    • Field Detail

      • MODIFY_FILTER

        static final java.lang.String MODIFY_FILTER
        Configuration property identifying the regular expression used to match the command string.

        If this property is not set, the handler will be a target for all modify commands.

        The following is an example of a filter property for a CommandHandler receiving OSGi Console-like commands: "modify.filter.regex=(\(?i\)\(osgi\).*)"

        The filter above ignores case and matches any "command" that begins with "osgi".

        See Also:
        Constant Field Values
      • DISPLAY_HELP

        static final java.lang.String DISPLAY_HELP
        Configuration property indicating if help information should be displayed when a "general" request for help information is requested. This expresses a desire to "hide" this command from general use.
        See Also:
        Constant Field Values
    • Method Detail

      • handleModify

        void handleModify(java.lang.String modifyCommmand,
                        ModifyResults results)
        This method is driven to process a MVS command which matched the modify.filter.regex.
        Parameters:
        modifyCommmand - modify command string
        results - object that can hold the result of processing the command
      • getName

        java.lang.String getName()
        CommandHandler identity (used in command responses)
        Returns:
        identity string for CommandHandler
      • getHelp

        java.util.List<java.lang.String> getHelp()
        Return help information for this CommandHandler.
        Returns:
        a list of strings that provide information about how to use this command handler. Each entry in the list issued as a line in an operator reply.