Package com.vmware.vim25.mo
Class ManagedObject
java.lang.Object
com.vmware.vim25.mo.ManagedObject
- Direct Known Subclasses:
AlarmManager,AuthorizationManager,CertificateManager,CryptoManager,CustomFieldsManager,CustomizationSpecManager,DatastoreNamespaceManager,DiagnosticManager,DirectPathProfileManager,DistributedVirtualSwitchManager,EnvironmentBrowser,EventManager,ExtensibleManagedObject,ExtensionManager,FailoverClusterConfigurator,FailoverClusterManager,FileManager,GuestAliasManager,GuestAuthManager,GuestFileManager,GuestOperationsManager,GuestProcessManager,GuestWindowsRegistryManager,HealthUpdateManager,HistoryCollector,HostAccessManager,HostAssignableHardwareManager,HostAuthenticationManager,HostAuthenticationStore,HostAutoStartManager,HostBootDeviceSystem,HostCacheConfigurationManager,HostCertificateManager,HostDatastoreBrowser,HostDatastoreSystem,HostDateTimeSystem,HostDiagnosticSystem,HostEsxAgentHostManager,HostFirmwareSystem,HostHealthStatusSystem,HostImageConfigManager,HostKernelModuleSystem,HostLocalAccountManager,HostNvdimmSystem,HostPatchManager,HostPowerSystem,HostSnmpSystem,HostSpecificationManager,HostVFlashManager,HostVsanInternalSystem,HostVsanSystem,HttpNfcLease,IoFilterManager,IpPoolManager,IscsiManager,LicenseAssignmentManager,LicenseManager,LocalizationManager,MessageBusProxy,OptionManager,OverheadMemoryManager,OvfManager,PerformanceManager,Profile,ProfileComplianceManager,ProfileManager,PropertyCollector,PropertyFilter,ResourcePlanningManager,ScheduledTaskManager,SearchIndex,ServiceInstance,ServiceManager,SessionManager,SimpleCommand,SiteInfoManager,StorageQueryManager,StorageResourceManager,TaskManager,TenantTenantManager,UserDirectory,View,ViewManager,VirtualDiskManager,VirtualizationManager,VirtualMachineCompatibilityChecker,VirtualMachineGuestCustomizationManager,VirtualMachineProvisioningChecker,VsanUpgradeSystem,VStorageObjectManagerBase
This class is intended to provide a wrapper around a managed object class.
The abstraction will hide the web service details and make the managed
objects OO style in the client side programming.
Every managed object class can inherit from this and take advantage of this
abstraction.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedManagedObject(ServerConnection serverConnection, ManagedObjectReference mor) Constructor that reuse exiting web service connection Use this constructor when you can re-use existing web service connection. -
Method Summary
Modifier and TypeMethodDescriptionprotected ManagedObjectReference[]convertMors(ManagedObject[] mos) protected ObjectgetCurrentProperty(String propertyName) protected Datastore[]getDatastores(String propName) protected PropertyFilter[]protected HostSystem[]protected ManagedObjectgetManagedObject(String propName) protected ManagedObject[]getManagedObjects(String propName) protected ManagedObject[]getManagedObjects(String propName, boolean mixedType) getMOR()get the ManagedObjectReference object pointing to the managed objectprotected Network[]getNetworks(String propName) getPropertiesByPaths(String[] propPaths) Get multiple properties by their pathsgetPropertyByPath(String propPath) protected ResourcePool[]getResourcePools(String propName) protected ScheduledTask[]getScheduledTasks(String propName) protected Task[]protected View[]protected VimPortTypeGet the web serviceprotected VirtualMachine[]protected ObjectContentretrieveObjectProperties(String[] properties) voidsetCachedProperty(String propertyName, Object value) Pre-populate this object's property cache with a value the caller already fetched (for example, from an InventoryNavigator bulk read).protected voidSet the ManagedObjectReference object pointing to the managed objectprotected voidSet up the ServerConnection, only when it hasn't been set yet.toString()protected Object[]waitForValues(String[] filterProps, String[] endWaitProps, Object[][] expectedVals) Handle Updates for a single object.
-
Constructor Details
-
ManagedObject
protected ManagedObject() -
ManagedObject
Constructor that reuse exiting web service connection Use this constructor when you can re-use existing web service connection.- Parameters:
serverConnection-mor-
-
-
Method Details
-
setMOR
Set the ManagedObjectReference object pointing to the managed object -
getMOR
get the ManagedObjectReference object pointing to the managed object- Returns:
-
getVimService
Get the web service- Returns:
-
getServerConnection
-
setServerConnection
Set up the ServerConnection, only when it hasn't been set yet.- Parameters:
sc-
-
retrieveObjectProperties
-
setCachedProperty
Pre-populate this object's property cache with a value the caller already fetched (for example, from an InventoryNavigator bulk read). A subsequentgetCurrentProperty(String)for the same name returns the cached value without contacting the server. The cache is opt-in: callers who never call this method incur no overhead and see the original always-round-trip behavior. Cached values do not expire — long-lived entities will return stale data if the underlying property changes on the server. -
getCurrentProperty
-
getPropertyByPath
-
getPropertiesByPaths
public Hashtable<String,Object> getPropertiesByPaths(String[] propPaths) throws InvalidProperty, RuntimeFault, RemoteException Get multiple properties by their paths- Parameters:
propPaths- an array of strings for property path- Returns:
- a Hashtable holding with the property path as key, and the value.
- Throws:
InvalidPropertyRuntimeFaultRemoteException
-
getManagedObjects
-
getManagedObjects
-
getDatastores
-
getNetworks
-
getVms
-
getFilter
-
getResourcePools
-
getTasks
-
getScheduledTasks
-
getViews
-
getHosts
-
getManagedObject
-
waitForValues
protected Object[] waitForValues(String[] filterProps, String[] endWaitProps, Object[][] expectedVals) throws InvalidProperty, RuntimeFault, RemoteException Handle Updates for a single object. waits till expected values of properties to check are reached Destroys the ObjectFilter when done.- Parameters:
filterProps- 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- Returns:
- true indicating expected values were met, and false otherwise
- Throws:
RemoteExceptionRuntimeFaultInvalidProperty
-
toString
-
convertMors
-