Package com.mks.api

Interface CmdRunnerCreator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      CmdRunner createCmdRunner()
      Constructs CmdRunner objects to run commands on the IntegrationPoint.
      java.util.Iterator getCmdRunners()
      Retrieves the list of CmdRunners created by this CmdRunnerCreator.
      java.lang.String getDefaultHostname()
      Retrieves the default value for the --hostname option that will be passed on each command.
      java.lang.String getDefaultImpersonationUser()
      Retrieves the default impersonation user for the CmdRunner.
      java.lang.String getDefaultPassword()
      Retrieves the default value for the --password option that will be passed on each command.
      int getDefaultPort()
      Retrieves the default value for the --port option that will be passed on each command.
      java.lang.String getDefaultUsername()
      Retrieves the default value for the --user option that will be passed on each command.
      void release()
      Releases the resources/commands held by this object.
      void release​(boolean force)
      Releases the resources/commands held by this object
      void setClientLocale​(java.lang.String value)  
      void setDefaultHostname​(java.lang.String host)
      Sets the default value for the --hostname option that will be passed on each command.
      void setDefaultImpersonationUser​(java.lang.String impUser)
      Sets the default impersonation user used for the CmdRunner instance.
      void setDefaultPassword​(java.lang.String pass)
      Sets the default value for the --password option that will be passed on each command.
      void setDefaultPort​(int port)
      Sets the default value for the --port option that will be passed on each command.
      void setDefaultUsername​(java.lang.String user)
      Sets the default value for the --user option that will be passed on each command.
    • Method Detail

      • createCmdRunner

        CmdRunner createCmdRunner()
                           throws APIException
        Constructs CmdRunner objects to run commands on the IntegrationPoint.
        Returns:
        A newly constructed CmdRunner to run commands.
        Throws:
        APIException
      • getCmdRunners

        java.util.Iterator getCmdRunners()
        Retrieves the list of CmdRunners created by this CmdRunnerCreator.
        Returns:
        An iterator over the active CmdRunner objects.
      • release

        void release()
              throws java.io.IOException,
                     APIException
        Releases the resources/commands held by this object. This method can only be called if there are no commands running.
        Throws:
        java.io.IOException - If there was a problem communicating with the IntegrationPoint.
        APIException - If there are currently commands running.
      • release

        void release​(boolean force)
              throws java.io.IOException,
                     APIException
        Releases the resources/commands held by this object
        Parameters:
        force - If true, any commands running will be terminated. .
        Throws:
        java.io.IOException - If there was a problem communicating with the IntegrationPoint.
        APIException - If there are currently commands running and force is false, or the API can't talk to the IntegrationPoint.
      • setDefaultImpersonationUser

        void setDefaultImpersonationUser​(java.lang.String impUser)
        Sets the default impersonation user used for the CmdRunner instance. This default user can be overriden by explicitly specifying the user on the command. The default impersonation user is null.
        Parameters:
        impUser - The default impersonation user to use with the CmdRunner.
      • getDefaultImpersonationUser

        java.lang.String getDefaultImpersonationUser()
        Retrieves the default impersonation user for the CmdRunner.
        Returns:
        The default impersonation user used by the CmdRunner.
      • getDefaultHostname

        java.lang.String getDefaultHostname()
        Retrieves the default value for the --hostname option that will be passed on each command.
        Returns:
        The default value for the --hostname option.
      • getDefaultPort

        int getDefaultPort()
        Retrieves the default value for the --port option that will be passed on each command.
        Returns:
        The default value for the --port option.
      • setDefaultHostname

        void setDefaultHostname​(java.lang.String host)
        Sets the default value for the --hostname option that will be passed on each command. This option is not sent if the setting is set to null. By default, the setting is null.
        Parameters:
        host - The default value for the --hostname option.
      • setDefaultPort

        void setDefaultPort​(int port)
        Sets the default value for the --port option that will be passed on each command. This option is not sent if the setting is set to null. By default, the setting is null.
        Parameters:
        port - The default value for the --port option.
      • getDefaultUsername

        java.lang.String getDefaultUsername()
        Retrieves the default value for the --user option that will be passed on each command. This option is not sent if the setting is set to null. By default, the setting is null.
        Returns:
        The default value for the --user option.
      • getDefaultPassword

        java.lang.String getDefaultPassword()
        Retrieves the default value for the --password option that will be passed on each command. This option is not used if the setting is set to null. By default, the setting is null.
        Returns:
        The default value for the --password option.
      • setDefaultUsername

        void setDefaultUsername​(java.lang.String user)
        Sets the default value for the --user option that will be passed on each command. This option is not sent if the setting is set to null. By default, the setting is null.
        Parameters:
        user - The default value for the --user option.
      • setDefaultPassword

        void setDefaultPassword​(java.lang.String pass)
        Sets the default value for the --password option that will be passed on each command. This option is not sent if the setting is set to null. By default, the setting is null.
        Parameters:
        pass - The default value for the --password option.
      • setClientLocale

        void setClientLocale​(java.lang.String value)