public class APISession extends Object
Modifier and Type | Field and Description |
---|---|
static int |
MAJOR_VERSION |
static int |
MINOR_VERSION |
static String |
VERSION |
Constructor and Description |
---|
APISession(ScmLogger logger)
Constructor for the API Session Object
Needs an ScmLogger to log all API operations
|
Modifier and Type | Method and Description |
---|---|
com.mks.api.response.Response |
connect(String host,
int portNum,
String user,
String paswd)
Establishes a connection with the MKS Integrity Server
|
String |
getHostName()
Returns the MKS Integrity Hostname for this APISession
|
ScmLogger |
getLogger()
Returns the ScmLogger for this APISession
|
String |
getPassword()
Returns the MKS Integrity Password for this APISession
|
int |
getPort()
Returns the MKS Integrity Port for this APISession
|
String |
getUserName()
Returns the MKS Integrity User for this APISession
|
com.mks.api.response.Response |
runCommand(com.mks.api.Command cmd)
This function executes a generic API Command
|
com.mks.api.response.Response |
runCommandAs(com.mks.api.Command cmd,
String impersonateUser)
This function executes a generic API Command impersonating another user
|
void |
terminate()
Terminate the API Session and Integration Point
|
public static final int MAJOR_VERSION
public static final int MINOR_VERSION
public APISession(ScmLogger logger)
logger
- public com.mks.api.response.Response connect(String host, int portNum, String user, String paswd) throws com.mks.api.response.APIException
host
- Hostname or IP address for the MKS Integrity ServerportNum
- Port number for the MKS Integrity Serveruser
- Username to connect to the MKS Integrity Serverpaswd
- Password for the User connecting to the servercom.mks.api.response.APIException
public com.mks.api.response.Response runCommand(com.mks.api.Command cmd) throws com.mks.api.response.APIException
cmd
- MKS API Command Object representing an API commandcom.mks.api.response.APIException
public com.mks.api.response.Response runCommandAs(com.mks.api.Command cmd, String impersonateUser) throws com.mks.api.response.APIException
cmd
- MKS API Command Object representing a API commandimpersonateUser
- The user to impersonatecom.mks.api.response.APIException
public void terminate()
public String getHostName()
public int getPort()
public String getUserName()
public String getPassword()
Copyright © 2003–2015 The Apache Software Foundation. All rights reserved.