com.vmware.apputils
Class SmServiceConnection

java.lang.Object
  extended by com.vmware.apputils.SmServiceConnection

public class SmServiceConnection
extends java.lang.Object

Connection Handler for SMS WebService


Field Summary
protected  com.vmware.vim.sms.SmServiceLocator _locator
           
protected  com.vmware.vim.sms.SmPortType _service
           
protected  int _svcState
           
static int ConnectionState_Connected
           
static int ConnectionState_Disconnected
           
 
Constructor Summary
SmServiceConnection()
           
 
Method Summary
 void connect(java.lang.String urlStr, java.lang.String cookie, boolean ignoreCerts)
          Creates an instance of the VMA proxy and establishes a connection
static SmServiceConnection CreateServiceConnection()
           
 void disconnect()
          Disconnects from the WebService
 com.vmware.vim.sms.SmPortType getService()
           
 void ignoreCert()
           
 boolean isConnected()
          Check if Connection is established or not.
 void loadSession(java.lang.String url, java.lang.String fileName, boolean ignoreCerts)
           
 void saveSession(java.lang.String fileName)
           
 int ServiceState()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ConnectionState_Connected

public static int ConnectionState_Connected

ConnectionState_Disconnected

public static int ConnectionState_Disconnected

_locator

protected com.vmware.vim.sms.SmServiceLocator _locator

_service

protected com.vmware.vim.sms.SmPortType _service

_svcState

protected int _svcState
Constructor Detail

SmServiceConnection

public SmServiceConnection()
Method Detail

CreateServiceConnection

public static SmServiceConnection CreateServiceConnection()

connect

public void connect(java.lang.String urlStr,
                    java.lang.String cookie,
                    boolean ignoreCerts)
             throws java.lang.Exception
Creates an instance of the VMA proxy and establishes a connection

Parameters:
urlStr - web service url
cookie - VC (HTTP) session cookie
ignoreCerts - indicates whether peer certificate should be validated
Throws:
java.lang.Exception

ignoreCert

public void ignoreCert()

saveSession

public void saveSession(java.lang.String fileName)
                 throws java.lang.Exception
Throws:
java.lang.Exception

loadSession

public void loadSession(java.lang.String url,
                        java.lang.String fileName,
                        boolean ignoreCerts)
                 throws java.lang.Exception
Throws:
java.lang.Exception

isConnected

public boolean isConnected()
Check if Connection is established or not.

Returns:
true if connected, false otherwise

getService

public com.vmware.vim.sms.SmPortType getService()
Returns:
Service instance

ServiceState

public int ServiceState()
Returns:
Service instance

disconnect

public void disconnect()
                throws java.lang.Exception
Disconnects from the WebService

Throws:
java.lang.Exception