本文整理汇总了Java中com.vmware.vim25.TaskDescription类的典型用法代码示例。如果您正苦于以下问题:Java TaskDescription类的具体用法?Java TaskDescription怎么用?Java TaskDescription使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TaskDescription类属于com.vmware.vim25包,在下文中一共展示了TaskDescription类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: printTaskDescription
import com.vmware.vim25.TaskDescription; //导入依赖的package包/类
static void printTaskDescription(TaskDescription td)
{
ElementDescription[] methodInfos = td.getMethodInfo();
System.out.println("\n***Method descriptions:" + methodInfos.length);
printElementDescriptions(methodInfos);
System.out.println("\n***Reason descriptions:");
TypeDescription[] reasons = td.getReason();
for(int i=0; reasons!=null && i<reasons.length; i++)
{
System.out.println("\nKey:" + reasons[i].getKey());
System.out.println("Label:" + reasons[i].getLabel());
System.out.println("Summary:" + reasons[i].getSummary());
}
System.out.println("\n***Task state enum descriptions:");
ElementDescription[] states = td.getState();
printElementDescriptions(states);
}
示例2: main
import com.vmware.vim25.TaskDescription; //导入依赖的package包/类
public static void main(String[] args) throws Exception
{
if(args.length != 3)
{
System.out.println("Usage: java PrintTaskManager "
+ "<url> <username> <password>");
return;
}
ServiceInstance si = new ServiceInstance(
new URL(args[0]), args[1], args[2], true);
TaskManager taskMgr = si.getTaskManager();
int maxCollector = taskMgr.getMaxCollector();
System.out.println("Maximum number of collectors to " +
"retrive historical tasks: " + maxCollector);
System.out.println("\nTask description:");
TaskDescription td = taskMgr.getDescriptioin();
printTaskDescription(td);
System.out.println("\nRecent tasks:");
Task[] recentTasks = taskMgr.getRecentTasks();
for(int i=0; recentTasks!=null && i<recentTasks.length; i++)
{
TaskInfo ti = recentTasks[i].getTaskInfo();
System.out.println("\nName:" + ti.getName());
System.out.println("Key:" + ti.getKey());
System.out.println("State:" + ti.getState());
}
si.getServerConnection().logout();
}
示例3: getDescription
import com.vmware.vim25.TaskDescription; //导入依赖的package包/类
TaskDescription getDescription();