hudson.scm
Class APISession

java.lang.Object
  extended by hudson.scm.APISession

public class APISession
extends Object

This class represents an Integration Point to a server. It also contains a Session object


Field Summary
static int MAJOR_VERSION
           
static int MINOR_VERSION
           
static String VERSION
           
 
Constructor Summary
APISession(String ipHost, int ipPortNum, String host, int portNum, String user, String paswd, boolean secure)
          Constructor for the API Session Object
 
Method Summary
 String getHostName()
          Returns the Integrity Hostname for this APISession
 String getIPHostName()
          Returns the Integrity Integration Point Hostname for this APISession
 String getIPPort()
          Returns the Integrity Integration Point Port for this APISession
 String getPort()
          Returns the Integrity Port for this APISession
 String getUserName()
          Returns the Integrity User for this APISession
 com.mks.api.response.Response runCommand(com.mks.api.Command cmd)
          This function executes a generic API/CLI Command
 com.mks.api.response.Response runCommandAs(com.mks.api.Command cmd, String impersonateUser)
          This function executes a generic API/CLI Command impersonating another user
 com.mks.api.response.Response runCommandWithInterim(com.mks.api.Command cmd)
          This function executes a generic API/CLI Command with interim
 void Terminate()
          Terminate the API Session and Integration Point
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION

MAJOR_VERSION

public static final int MAJOR_VERSION

MINOR_VERSION

public static final int MINOR_VERSION
Constructor Detail

APISession

public APISession(String ipHost,
                  int ipPortNum,
                  String host,
                  int portNum,
                  String user,
                  String paswd,
                  boolean secure)
           throws com.mks.api.response.APIException
Constructor for the API Session Object

Throws:
com.mks.api.response.APIException
Method Detail

runCommand

public com.mks.api.response.Response runCommand(com.mks.api.Command cmd)
                                         throws com.mks.api.response.APIException
This function executes a generic API/CLI Command

Parameters:
cmd - Integrity API Command Object representing a CLI command
Returns:
Integrity API Response Object
Throws:
com.mks.api.response.APIException

runCommandWithInterim

public com.mks.api.response.Response runCommandWithInterim(com.mks.api.Command cmd)
                                                    throws com.mks.api.response.APIException
This function executes a generic API/CLI Command with interim

Parameters:
cmd - Integrity API Command Object representing a CLI command
Returns:
Integrity API Response Object
Throws:
com.mks.api.response.APIException

runCommandAs

public com.mks.api.response.Response runCommandAs(com.mks.api.Command cmd,
                                                  String impersonateUser)
                                           throws com.mks.api.response.APIException
This function executes a generic API/CLI Command impersonating another user

Parameters:
cmd - Integrity API Command Object representing a CLI command
impersonateUser - The user to impersonate
Returns:
Integrity API Response Object
Throws:
com.mks.api.response.APIException

Terminate

public void Terminate()
Terminate the API Session and Integration Point


getIPHostName

public String getIPHostName()
Returns the Integrity Integration Point Hostname for this APISession

Returns:

getIPPort

public String getIPPort()
Returns the Integrity Integration Point Port for this APISession

Returns:

getHostName

public String getHostName()
Returns the Integrity Hostname for this APISession

Returns:

getPort

public String getPort()
Returns the Integrity Port for this APISession

Returns:

getUserName

public String getUserName()
Returns the Integrity User for this APISession

Returns:


Copyright © 2004-2012 Hudson. All Rights Reserved.