Package com.vmware.aurora.vc.vcevent.VcEventHandlers

Examples of com.vmware.aurora.vc.vcevent.VcEventHandlers.TaskUpdateProgressEvent


      VcEventHandlers handlers = VcEventHandlers.getInstance();
      logger.debug("\ttaskMoRef: " + taskMoRef.getValue());
      logger.debug("\tprogress:     " + progress);
      if (progress != null) {
         /* Create and fire TaskUpdateProgress pseudo-event. */
         TaskUpdateProgressEvent taskEvent =
            handlers.new TaskUpdateProgressEvent(taskMoRef, progress);
         handlers.fire(taskEvent);
      }
   }
View Full Code Here


   /**
    * A handler for TaskUpdateProgress pseudo-event.
    */
   public class VcTaskUpdateProgressHandler implements IVcEventHandler {
      public boolean eventHandler(VcEventType type, Event e) throws Exception {
         TaskUpdateProgressEvent taskEvent = (TaskUpdateProgressEvent)e;
         ManagedObjectReference taskMoRef = taskEvent.getTaskMoRef();
         synchronized(VcTaskMgr.this) {
            VcTask task = pendingTasks.get(taskMoRef);
            if (task != null) {
               logger.info("task: " + task.getMoRef() + " progress: " + taskEvent.getProgress());
               task.setProgress(taskEvent.getProgress());
               return true;
            }
            return false;
         }
      }
View Full Code Here

TOP

Related Classes of com.vmware.aurora.vc.vcevent.VcEventHandlers.TaskUpdateProgressEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.