Java Sample Programs (JAXWS Bindings)
When you download the SDK, you can find the java sample programs and related files in the following directories.
SDK\vsphere-ws\java\JAXWS\samples\com\vmware – Top-level directory for Java samples. Details listed in Java Sample Programs.
SDK\vsphere-ws\java\JAXWS\samples\com\vmware\vim25 – Stub directories. The vim25 directory contains stubs for VirtualCenter 2.5 and later, including vSphere 4.0 and later.
SDK\vsphere-ws\java\JAXWS\samples\com\vmware\vm – samples written for a single vm
Retrieves and formats the last event from the host daemon or vpxd. Includes a function that formats the event message.
Demonstrates how to create and monitor an EventHistoryCollector. Uses the latestPage property of EventHistoryCollector to filter the events.
Creating EventHistoryCollector filtered for a single virtual machine.
Monitoring events using the latestPage property of the EventHistoryCollector.
Demonstrates how to use the PropertyCollector to monitor one or more properties of one or more managed objects. In particular this sample monitors one or all virtual machines and all hosts or one host for changes to some basic properties.
Demonstrates uses of the licensing API using License managed object reference.
Illustrates the use of the PropertyCollector API.
Demonstrates the use of HostProfileManager and ProfileComplainceManager.
An ESXtop-like sample application that lets administrators specify the CPU and memory counters by name to obtain metrics for a specified host.
Demonstrates creating a ScheduledTask using the ScheduledTaskManager.
Displays the CanonicalName,Vendor, Model, Data, Namespace and NamespaceId of the host’s SCSI LUN.
Implementation class for CredentialStoreAdmin.
This class provides the same functionality as FileInputStream, except that the close() method is overridden so that FileInputStream class’ close() method does not get called.
Demonstrates the OvfManager by exporting VMDKs and OVF Descriptors of all VMs in the vApps.
Demonstrates how the OvfManager exports VMDKs from a VM to the localSystem.
Checks whether migration with VMotion is feasible between two hosts. Performs the migration if the hosts are compatible.
Consolidates a linked virtual machine by using the VirtualMachine.PromoteDisks method.