Package com.mks.api
Interface CmdRunnerCreator
-
- All Superinterfaces:
IntegrationVersionRequest
- All Known Subinterfaces:
Session
public interface CmdRunnerCreator extends IntegrationVersionRequest
Interface used to model an environment in which a collection of CmdRunner instances can be created.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CmdRunner
createCmdRunner()
ConstructsCmdRunner
objects to run commands on theIntegrationPoint
.java.util.Iterator
getCmdRunners()
Retrieves the list ofCmdRunner
s created by thisCmdRunnerCreator
.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 theCmdRunner
.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 objectvoid
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 theCmdRunner
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.-
Methods inherited from interface com.mks.api.IntegrationVersionRequest
getAPIRequestVersion
-
-
-
-
Method Detail
-
createCmdRunner
CmdRunner createCmdRunner() throws APIException
ConstructsCmdRunner
objects to run commands on theIntegrationPoint
.- Returns:
- A newly constructed
CmdRunner
to run commands. - Throws:
APIException
-
getCmdRunners
java.util.Iterator getCmdRunners()
Retrieves the list ofCmdRunner
s created by thisCmdRunnerCreator
.- 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 theIntegrationPoint
.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
- Iftrue
, any commands running will be terminated. .- Throws:
java.io.IOException
- If there was a problem communicating with theIntegrationPoint
.APIException
- If there are currently commands running and force isfalse
, or the API can't talk to the IntegrationPoint.
-
setDefaultImpersonationUser
void setDefaultImpersonationUser(java.lang.String impUser)
Sets the default impersonation user used for theCmdRunner
instance. This default user can be overriden by explicitly specifying the user on the command. The default impersonation user isnull
.- Parameters:
impUser
- The default impersonation user to use with theCmdRunner
.
-
getDefaultImpersonationUser
java.lang.String getDefaultImpersonationUser()
Retrieves the default impersonation user for theCmdRunner
.- 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 tonull
. By default, the setting isnull
.- 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 tonull
. By default, the setting isnull
.- 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 tonull
. By default, the setting isnull
.- 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 tonull
. By default, the setting isnull
.- 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 tonull
. By default, the setting isnull
.- 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 tonull
. By default, the setting isnull
.- Parameters:
pass
- The default value for the --password option.
-
setClientLocale
void setClientLocale(java.lang.String value)
-
-