vSphere Methods for
Property Collection
The
PropertyCollector
supports the
following approaches to obtaining objects and properties from the server:
- If your client application does not keep a synchronized representation of server state, use theRetrievePropertiesExmethod.RetrievePropertiesExinstantiates a filter, collects the specified objects and properties, and returns the data to your client application as anObjectContentdata object. The server does not add the filter to thePropertyCollector.filterarray. The server destroys the filter after returning the results to your client.
- If your application maintains a synchronized representation of server state, use theCreateFilterandWaitForUpdatesExmethods.WaitForUpdatesExreturns descriptions of property changes, organized by the filter that identified the properties.
In either case, you create a
PropertyFilterSpec
data object
to specify the objects and properties you want to retrieve from the server.
The following table shows the
PropertyCollector
methods
organized by the context in which you use them. For more information about
these methods, see the
vSphere API Reference
.
Method Context
| Method
| Description
|
---|---|---|
Monitor
properties using different filters
| CreatePropertyCollector
| Creates a new
PropertyCollector
object to monitor properties using different filters. The vSphere server
handles requests for a
PropertyCollector
instance independently of any other instances of the
PropertyCollector on
the server.
|
DestroyPropertyCollector
| Destroys an instance of
a
PropertyCollector that
was created by a call to
CreatePropertyCollector from your client
application.
| |
Single
collection operation
| RetrievePropertiesEx
| Retrieves property data for the managed objects
specified by a single-use PropertyFilterSpec . |
ContinueRetrievePropertiesEx
| Retrieves additional
property data for an operation started by
RetrievePropertiesEx .
| |
CancelRetrievePropertiesEx
| Cancels a
RetrievePropertiesEx
or
ContinueRetrievePropertiesEx operation.
| |
Incremental collection or monitoring operation
| WaitForUpdatesEx
| Retrieves changes to property data since the last
WaitForUpdatesEx cycle.
WaitForUpdatesEx blocks
until one or more changes are detected or until the request times
out. |
CancelWaitForUpdatesEx
| Cancels a
WaitForUpdatesEx
operation.
| |
General
| CreateFilter
| Creates a new instance
of a
PropertyFilter managed
object.
|