hudson.scm
Class APISession

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

public class APISession
extends java.lang.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 java.lang.String VERSION
           
 
Constructor Summary
APISession(java.lang.String ipHost, int ipPortNum, java.lang.String host, int portNum, java.lang.String user, java.lang.String paswd, boolean secure)
          Constructor for the API Session Object
 
Method Summary
 java.lang.String getHostName()
          Returns the MKS Integrity Hostname for this APISession
 java.lang.String getIPHostName()
          Returns the MKS Integration Point Hostname for this APISession
 java.lang.String getIPPort()
          Returns the MKS Integration Point Port for this APISession
 java.lang.String getPort()
          Returns the MKS Integrity Port for this APISession
 java.lang.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, java.lang.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 java.lang.String VERSION

MAJOR_VERSION

public static final int MAJOR_VERSION

MINOR_VERSION

public static final int MINOR_VERSION
Constructor Detail

APISession

public APISession(java.lang.String ipHost,
                  int ipPortNum,
                  java.lang.String host,
                  int portNum,
                  java.lang.String user,
                  java.lang.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,
                                                  java.lang.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


getIPHostName

public java.lang.String getIPHostName()
Returns the MKS Integration Point Hostname for this APISession

Returns:

getIPPort

public java.lang.String getIPPort()
Returns the MKS Integration Point Port for this APISession

Returns:

getHostName

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

Returns:

getPort

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

Returns:

getUserName

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

Returns:


Copyright © 2004-2011 Hudson. All Rights Reserved.