|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.vmware.apputils.vim25.ServiceUtil
public class ServiceUtil
Utility wrapper methods for the vimService methods
| Constructor Summary | |
|---|---|
ServiceUtil()
|
|
| Method Summary | |
|---|---|
com.vmware.vim25.SelectionSpec[] |
buildFullTraversal()
This method creates a SelectionSpec[] to traverses the entire inventory tree starting at a Folder |
com.vmware.vim25.PropertySpec[] |
buildPropertySpecArray(java.lang.String[][] typeinfo)
This code takes an array of [typename, property, property, ...] and converts it into a PropertySpec[]. |
void |
clientConnect()
Connect to the service |
void |
clientDisconnect()
Disconnect from the service |
void |
clientLoadSession(java.lang.String cookieString)
|
void |
clientSaveSession(java.lang.String fileName)
|
static ServiceUtil |
CreateServiceUtil()
|
com.vmware.vim25.ObjectContent[] |
getAllContainerContents()
Retrieve Container contents for all containers recursively from root |
com.vmware.vim25.ObjectContent[] |
getContentsRecursively(com.vmware.vim25.ManagedObjectReference root,
boolean recurse)
Retrieve container contents from specified root recursively if requested. |
com.vmware.vim25.ObjectContent[] |
getContentsRecursively(com.vmware.vim25.ManagedObjectReference collector,
com.vmware.vim25.ManagedObjectReference root,
java.lang.String[][] typeinfo,
boolean recurse)
Retrieve content recursively with multiple properties. |
com.vmware.vim25.ManagedObjectReference |
getDecendentMoRef(com.vmware.vim25.ManagedObjectReference root,
java.lang.String type,
java.lang.String name)
Get the ManagedObjectReference for an item under the specified root folder that has the type and name specified. |
java.util.ArrayList |
getDecendentMoRefs(com.vmware.vim25.ManagedObjectReference root,
java.lang.String type)
Retrieve all the ManagedObjectReferences of the type specified. |
java.util.ArrayList |
getDecendentMoRefs(com.vmware.vim25.ManagedObjectReference root,
java.lang.String type,
java.lang.String[][] filter)
|
java.lang.Object |
getDynamicProperty(com.vmware.vim25.ManagedObjectReference mor,
java.lang.String propertyName)
Retrieve a single object |
com.vmware.vim25.ManagedObjectReference |
getFirstDecendentMoRef(com.vmware.vim25.ManagedObjectReference root,
java.lang.String type)
Get the first ManagedObjectReference from a root of the specified type |
com.vmware.vim25.ManagedObjectReference |
getMoRefProp(com.vmware.vim25.ManagedObjectReference objMor,
java.lang.String propName)
Get a MORef from the property returned. |
com.vmware.vim25.ObjectContent[] |
getObjectProperties(com.vmware.vim25.ManagedObjectReference collector,
com.vmware.vim25.ManagedObjectReference mobj,
java.lang.String[] properties)
Retrieve contents for a single object based on the property collector registered with the service. |
void |
init(AppUtil cb,
ServiceConnection svc)
|
protected void |
updateValues(java.lang.String[] props,
java.lang.Object[] vals,
com.vmware.vim25.PropertyChange propchg)
|
java.lang.String |
waitForTask(com.vmware.vim25.ManagedObjectReference taskmor)
|
java.lang.Object[] |
waitForValues(com.vmware.vim25.ManagedObjectReference objmor,
java.lang.String[] filterProps,
java.lang.String[] endWaitProps,
java.lang.Object[][] expectedVals)
Handle Updates for a single object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceUtil()
| Method Detail |
|---|
public static ServiceUtil CreateServiceUtil()
public void init(AppUtil cb,
ServiceConnection svc)
throws java.lang.Exception
java.lang.Exception
public void clientConnect()
throws java.lang.Exception
java.lang.Exception
public void clientLoadSession(java.lang.String cookieString)
throws java.lang.Exception
java.lang.Exception
public void clientSaveSession(java.lang.String fileName)
throws java.lang.Exception
java.lang.Exception
public void clientDisconnect()
throws java.lang.Exception
java.lang.Exception
public com.vmware.vim25.ManagedObjectReference getDecendentMoRef(com.vmware.vim25.ManagedObjectReference root,
java.lang.String type,
java.lang.String name)
throws java.lang.Exception
root - a root folder if available, or null for defaulttype - type of the managed objectname - name to match
java.lang.Exception
public com.vmware.vim25.ManagedObjectReference getFirstDecendentMoRef(com.vmware.vim25.ManagedObjectReference root,
java.lang.String type)
throws java.lang.Exception
root - a root folder if available, or null for defaulttype - the type of the entity - e.g. VirtualMachine
java.lang.Exception
public java.util.ArrayList getDecendentMoRefs(com.vmware.vim25.ManagedObjectReference root,
java.lang.String type)
throws java.lang.Exception
root - a root folder if available, or null for defaulttype - type of container refs to retrieve
java.lang.Exception
public java.util.ArrayList getDecendentMoRefs(com.vmware.vim25.ManagedObjectReference root,
java.lang.String type,
java.lang.String[][] filter)
throws java.lang.Exception
java.lang.Exception
public com.vmware.vim25.ObjectContent[] getAllContainerContents()
throws java.lang.Exception
java.lang.Exception
public com.vmware.vim25.ObjectContent[] getContentsRecursively(com.vmware.vim25.ManagedObjectReference root,
boolean recurse)
throws java.lang.Exception
root - a root folder if available, or null for defaultrecurse - retrieve contents recursively from the root down
java.lang.Exception
public com.vmware.vim25.ObjectContent[] getContentsRecursively(com.vmware.vim25.ManagedObjectReference collector,
com.vmware.vim25.ManagedObjectReference root,
java.lang.String[][] typeinfo,
boolean recurse)
throws java.lang.Exception
collector - a property collector if available or null for defaultroot - a root folder if available, or null for defaulttypeinfo - 2D array of properties for each typenamerecurse - retrieve contents recursively from the root down
java.lang.Exception
public com.vmware.vim25.ManagedObjectReference getMoRefProp(com.vmware.vim25.ManagedObjectReference objMor,
java.lang.String propName)
throws java.lang.Exception
objMor - Object to get a reference property frompropName - name of the property that is the MORef
java.lang.Exception
public com.vmware.vim25.ObjectContent[] getObjectProperties(com.vmware.vim25.ManagedObjectReference collector,
com.vmware.vim25.ManagedObjectReference mobj,
java.lang.String[] properties)
throws java.lang.Exception
collector - Property collector registered with servicemobj - Managed Object Reference to get contents forproperties - names of properties of object to retrieve
java.lang.Exception
public java.lang.Object getDynamicProperty(com.vmware.vim25.ManagedObjectReference mor,
java.lang.String propertyName)
throws java.lang.Exception
mor - Managed Object Reference to get contents forpropertyName - of the object to retrieve
java.lang.Exception
public java.lang.String waitForTask(com.vmware.vim25.ManagedObjectReference taskmor)
throws java.lang.Exception
java.lang.Exception
public java.lang.Object[] waitForValues(com.vmware.vim25.ManagedObjectReference objmor,
java.lang.String[] filterProps,
java.lang.String[] endWaitProps,
java.lang.Object[][] expectedVals)
throws java.lang.Exception
objmor - MOR of the Object to wait forfilterProps - Properties list to filterendWaitProps - Properties list to check for expected values
these be properties of a property in the filter properties listexpectedVals - values for properties to end the wait
java.lang.Exception
protected void updateValues(java.lang.String[] props,
java.lang.Object[] vals,
com.vmware.vim25.PropertyChange propchg)
public com.vmware.vim25.SelectionSpec[] buildFullTraversal()
public com.vmware.vim25.PropertySpec[] buildPropertySpecArray(java.lang.String[][] typeinfo)
typeinfo - 2D array of type and properties to retrieve
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||