com.vmware.vim25.mo.samples.scheduling.WeeklyRecurrenceScheduledTask.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 ? Dcom/vmware/vim25/mo/samples/scheduling/WeeklyRecurrenceScheduledTask java/lang/Object ()V Code
LineNumberTable LocalVariableTable this FLcom/vmware/vim25/mo/samples/scheduling/WeeklyRecurrenceScheduledTask; createSchedulerSpec 8(Ljava/lang/String;)Lcom/vmware/vim25/ScheduledTaskSpec; com/vmware/vim25/MethodAction
RebootGuest
setName (Ljava/lang/String;)V %com/vmware/vim25/MethodActionArgument
setArgument +([Lcom/vmware/vim25/MethodActionArgument;)V $com/vmware/vim25/WeeklyTaskScheduler
# $ % setSaturday (Z)V
' ( ) setHour (I)V
+ , ) setMinute
. / ) setInterval 1 "com/vmware/vim25/ScheduledTaskSpec
0
0 5 /Reboot GuestOS at 23:59PM every other Saturday.
0 7 8 setDescription
0 : ; %
setEnabled
0 = > ? setAction (Lcom/vmware/vim25/Action;)V
0 A B C setScheduler #(Lcom/vmware/vim25/TaskScheduler;)V taskName Ljava/lang/String; action Lcom/vmware/vim25/MethodAction; scheduler &Lcom/vmware/vim25/WeeklyTaskScheduler; scheduleSpec $Lcom/vmware/vim25/ScheduledTaskSpec; constructOptions (()[Lcom/vmware/vim25/mo/util/OptionSpec; O #com/vmware/vim25/mo/util/OptionSpec Q vmpath S String U VM Inventory Path
N W X L(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V Z taskname \ Name of the task to be scheduled useroptions &[Lcom/vmware/vim25/mo/util/OptionSpec; main ([Ljava/lang/String;)V
Exceptions c java/lang/Exception e *com/vmware/vim25/mo/util/CommandLineParser
g L M
d i j <([Lcom/vmware/vim25/mo/util/OptionSpec;[Ljava/lang/String;)V l url
d n o p
get_option &(Ljava/lang/String;)Ljava/lang/String; r username t password v #com/vmware/vim25/mo/ServiceInstance x java/net/URL
w z
u | } 6(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;Z)V
u ? ? getSearchIndex #()Lcom/vmware/vim25/mo/SearchIndex;
? ? ? com/vmware/vim25/mo/SearchIndex ? ? findByInventoryPath 7(Ljava/lang/String;)Lcom/vmware/vim25/mo/ManagedEntity; ? "com/vmware/vim25/mo/VirtualMachine
?
u ? ? ? getScheduledTaskManager ,()Lcom/vmware/vim25/mo/ScheduledTaskManager;
? ? ? (com/vmware/vim25/mo/ScheduledTaskManager ? ? createScheduledTask l(Lcom/vmware/vim25/mo/ManagedEntity;Lcom/vmware/vim25/ScheduledTaskSpec;)Lcom/vmware/vim25/mo/ScheduledTask; ? ? ? java/lang/System ? ? out Ljava/io/PrintStream; ? java/lang/StringBuilder ? Task:
? z
? ? ? ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? has been successfully added.
? ? ? ? toString ()Ljava/lang/String;
? ? ? java/io/PrintStream ? println ? 4SchduledTaskManager is not available on this target.
u ? ? ? getServerConnection (()Lcom/vmware/vim25/mo/ServerConnection;
? ? ? $com/vmware/vim25/mo/ServerConnection ? logout args [Ljava/lang/String; clp ,Lcom/vmware/vim25/mo/util/CommandLineParser; urlStr si %Lcom/vmware/vim25/mo/ServiceInstance; vm $Lcom/vmware/vim25/mo/VirtualMachine; spec stm *Lcom/vmware/vim25/mo/ScheduledTaskManager;
StackMapTable ? ? java/lang/String
SourceFile "WeeklyRecurrenceScheduledTask.java ! / *? ?
=
? X? Y? L+? +? ? ? Y? !M,? ",? &,;? *,? -? 0Y? 2N-*? 3-4? 6-? 9-+? <-,? @-?
> A B C E F # G ) H / I 4 K <