hudson.scm
Class APISession

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

public class APISession
extends Object

This class represents the 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 host, int portNum, String user, String paswd, boolean secure)
          Constructor for the API Session Object
 
Method Summary
 String getHostName()
          Returns the MKS Integrity Hostname for this APISession
 String 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/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
 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 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 - MKS API Command Object representing a CLI command
Returns:
MKS 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 - MKS API Command Object representing a CLI command
impersonateUser - The user to impersonate
Returns:
MKS API Response Object
Throws:
com.mks.api.response.APIException

Terminate

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


getHostName

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

Returns:

getPort

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

Returns:

getUserName

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

Returns:


Copyright © 2004-2011 Hudson. All Rights Reserved.