com.vmware.vim25.mo.samples.event.QueryEvents.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vijava Show documentation
Show all versions of vijava Show documentation
Java API for accessing VMWare web services API
The newest version!
???? 2! -com/vmware/vim25/mo/samples/event/QueryEvents java/lang/Object ()V Code
LineNumberTable LocalVariableTable this /Lcom/vmware/vim25/mo/samples/event/QueryEvents; main ([Ljava/lang/String;)V
Exceptions java/lang/Exception java/lang/System out Ljava/io/PrintStream; 3Usage: java QueryEvents
java/io/PrintStream println (Ljava/lang/String;)V " #com/vmware/vim25/mo/ServiceInstance $ java/net/URL
# &
! ( ) 6(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;Z)V
! + , - getEventManager $()Lcom/vmware/vim25/mo/EventManager;
/ 1 0 com/vmware/vim25/mo/EventManager 2 3 getLatestEvent ()Lcom/vmware/vim25/Event;
5 6 7
printEvent (Lcom/vmware/vim25/Event;)V 9 com/vmware/vim25/EventFilterSpec
8 < java/lang/String > VmFailedToPowerOnEvent @ HostConnectionLostEvent
8 B C setType E error G warning
8 I J setCategory L (com/vmware/vim25/EventFilterSpecByEntity
K
! O P Q
getRootFolder ()Lcom/vmware/vim25/mo/Folder;
S U T com/vmware/vim25/mo/Folder V W getMOR +()Lcom/vmware/vim25/ManagedObjectReference;
K Y Z [ setEntity ,(Lcom/vmware/vim25/ManagedObjectReference;)V ] _ ^ /com/vmware/vim25/EventFilterSpecRecursionOption ` a children 1Lcom/vmware/vim25/EventFilterSpecRecursionOption;
K c d e setRecursion 4(Lcom/vmware/vim25/EventFilterSpecRecursionOption;)V g &com/vmware/vim25/EventFilterSpecByTime
f
! j k l currentTime ()Ljava/util/Calendar;
n p o java/util/Calendar q r roll (IZ)V
f t u v setBeginTime (Ljava/util/Calendar;)V
8 x y z setTime +(Lcom/vmware/vim25/EventFilterSpecByTime;)V | *com/vmware/vim25/EventFilterSpecByUsername
{
{ ? ?
setSystemUser (Z)V ?
administrator
{ ? ? setUserList
/ ? ? ? queryEvents =(Lcom/vmware/vim25/EventFilterSpec;)[Lcom/vmware/vim25/Event; ? java/lang/StringBuilder ?
Event #
? &
? ? ? ? append (I)Ljava/lang/StringBuilder;
? ? ? ? toString ()Ljava/lang/String;
! ? ? ? getServerConnection (()Lcom/vmware/vim25/mo/ServerConnection;
? ? ? $com/vmware/vim25/mo/ServerConnection ? logout args [Ljava/lang/String; si %Lcom/vmware/vim25/mo/ServiceInstance; evtMgr "Lcom/vmware/vim25/mo/EventManager; latestEvent Lcom/vmware/vim25/Event; efs "Lcom/vmware/vim25/EventFilterSpec; eFilter *Lcom/vmware/vim25/EventFilterSpecByEntity; tFilter (Lcom/vmware/vim25/EventFilterSpecByTime; startTime Ljava/util/Calendar; uFilter ,Lcom/vmware/vim25/EventFilterSpecByUsername; events [Lcom/vmware/vim25/Event; i I
StackMapTable ? ? com/vmware/vim25/Event ?
? ? ? getClass ()Ljava/lang/Class;
? ? ? java/lang/Class ? ? getName
; ? ? ? lastIndexOf (I)I
; ? ? ? substring (I)Ljava/lang/String; ? Type:
? ? ? ? -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? Key:
? ? ? ? getKey ()I ? ChainId:
? ? ? ?
getChainId ? User:
? ? ? ? getUserName ? Time:
? ? ? l getCreatedTime
n ? ? ? getTime ()Ljava/util/Date;
? ? ? ? -(Ljava/lang/Object;)Ljava/lang/StringBuilder; ? FormattedMessage:
? ? ? ? getFullFormattedMessage
? ? ? ?
getDatacenter ,()Lcom/vmware/vim25/DatacenterEventArgument; ? Datacenter:
? ? ? (com/vmware/vim25/DatacenterEventArgument ? W
? ? ? getComputeResource 1()Lcom/vmware/vim25/ComputeResourceEventArgument; ComputeResource:
-com/vmware/vim25/ComputeResourceEventArgument ? W
?
getHost &()Lcom/vmware/vim25/HostEventArgument; Host:
"com/vmware/vim25/HostEventArgument W
? getVm $()Lcom/vmware/vim25/VmEventArgument; VM:
com/vmware/vim25/VmEventArgument W evt typeName Ljava/lang/String; lastDot
SourceFile QueryEvents.java ! / *? ?
1
U *?? ? ? ?? !Y? #Y*2? %*2*2? 'L+? *M,? .N-? 4? 8Y? ::? ;Y=SY?S? A? ;YDSYFS? H? KY? M:+? N? R? X? \? b? fY? h:+? i:? m? s? w? {Y? }:? ~? ;Y?S? ?,? ?: 6
? %? ? ?Y?? ?
? ?? ??
2? 4?
?
????+? ?? ??
? $ 5 7 9 <