com.vmware.apputils.vim
Class ServiceConnection
java.lang.Object
com.vmware.apputils.vim.ServiceConnection
public class ServiceConnection
- extends java.lang.Object
Connection Handler for WebService
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConnectionState_Connected
public static int ConnectionState_Connected
ConnectionState_Disconnected
public static int ConnectionState_Disconnected
_locator
protected com.vmware.vim.VimServiceLocator _locator
_service
protected com.vmware.vim.VimPortType _service
_svcState
protected int _svcState
_sic
protected com.vmware.vim.ServiceContent _sic
_svcRef
protected com.vmware.vim.ManagedObjectReference _svcRef
ServiceConnection
public ServiceConnection(java.lang.String svcRefVal)
CreateServiceConnection
public static ServiceConnection CreateServiceConnection(java.lang.String inst)
connect
public void connect(java.lang.String urlStr,
java.lang.String username,
java.lang.String password,
boolean ignoreCerts)
throws java.lang.Exception
- Creates an instance of the VMA proxy and establishes a connection
- Parameters:
urlStr - web service urlusername - authorized userpassword - authorized password for user
- 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.VimPortType getService()
- Returns:
- Service instance
getServiceInstanceRef
public com.vmware.vim.ManagedObjectReference getServiceInstanceRef()
- Returns:
- Service MO Reference
getServiceContent
public com.vmware.vim.ServiceContent getServiceContent()
- Returns:
- Service instance content
getPropCol
public com.vmware.vim.ManagedObjectReference getPropCol()
- Returns:
- Service property collector
getRootFolder
public com.vmware.vim.ManagedObjectReference getRootFolder()
- Returns:
- Root folder
ServiceState
public int ServiceState()
- Returns:
- Service instance
disconnect
public void disconnect()
throws java.lang.Exception
- Disconnects from the WebService
- Throws:
java.lang.Exception