Examples of TaskInfo


Examples of com.narirelays.ems.persistence.orm.TaskInfo

      result.setFailed(TASK_PARAM_REQUIRE_ID);
    } else {
      if (jobid == null) {
        result.setFailed(TASK_INFO_REQUIRE_ID);
      } else {
        TaskInfo taskInfo = taskInfoDAO.findById(jobid);
        if(taskInfo==null){
          result.setFailed(TASK_INFO_NOTEXIST,jobid);
        }else{
          TaskParamV taskParamV = taskParamVDAO
              .findById(new TaskParamVId(jobid, param_name));
View Full Code Here

Examples of com.narirelays.ems.persistence.orm.TaskInfo

  public OperResult queryTaskParamV(String jobid) {
    OperResult result = new OperResult();
    if (jobid == null) {
      result.setFailed(TASK_INFO_REQUIRE_ID);
    } else {
      TaskInfo taskInfo = taskInfoDAO.findById(jobid);
      if (taskInfo == null) {
        result.setFailed(TASK_INFO_NOTEXIST, jobid);
      } else {
        ClassRegister classRegister = taskInfo.getClassRegister();
        if (classRegister.getClassname() != null) {
          try {
            Class c = Class.forName(classRegister.getClassname());
            List<PropertyDescriptor> pros = ObjectListConvert2DynaBeanList
                .getClassProperties(c);
            List<LazyDynaBean> beans = new ArrayList<LazyDynaBean>();
            Set<TaskParamV> taskVs = taskInfo.getTaskParamVs();
            for (PropertyDescriptor pro : pros) {
              LazyDynaBean bean = ObjectListConvert2DynaBeanList
                  .convert(pro);
              bean.set("type", pro.getPropertyType()
                  .getName());
View Full Code Here

Examples of com.vmware.vim.binding.vim.TaskInfo

                           stringBuffer.append("' (");
                           stringBuffer.append(pChange.getOp().toString());
                           stringBuffer.append(") \n");
                           if (taskUpdate) {
                              if (pChange.getName().equals("info")) {
                                 TaskInfo taskInfo =
                                       (TaskInfo) pChange.getVal();
                                 stringBuffer.append("\t\t\t");
                                 stringBuffer.append("taskMoRef: ");
                                 stringBuffer.append(taskInfo.getTask()
                                       .getValue());
                                 stringBuffer.append("\n");
                                 stringBuffer.append("state: ");
                                 stringBuffer.append(taskInfo.getState()
                                       .toString());
                                 stringBuffer.append("\n");
                                 stringBuffer.append("progress: ");
                                 stringBuffer.append(taskInfo.getProgress());
                                 stringBuffer.append("\n");
                              }
                           }
                        }
                     }
View Full Code Here

Examples of com.vmware.vim25.TaskInfo

        _context.getService().reconfigureDvsTask(dvSwitchMor, dvsSpec);
    }

    public TaskInfo updateVMWareDVSwitchGetTask(ManagedObjectReference dvSwitchMor, VMwareDVSConfigSpec dvsSpec) throws Exception {
        ManagedObjectReference task = _context.getService().reconfigureDvsTask(dvSwitchMor, dvsSpec);
        TaskInfo info = (TaskInfo) (_context.getVimClient().getDynamicProperty(task, "info"));
        boolean waitvalue = _context.getVimClient().waitForTask(task);
        return info;
    }
View Full Code Here

Examples of com.vmware.vim25.TaskInfo

    public static String getTaskFailureInfo(VmwareContext context, ManagedObjectReference morTask) {
      StringBuffer sb = new StringBuffer();

      try {
        TaskInfo info = (TaskInfo)context.getVimClient().getDynamicProperty(morTask, "info");
        if(info != null) {
          LocalizedMethodFault fault = info.getError();
          if(fault != null) {
            sb.append(fault.getLocalizedMessage()).append(" ");

            if(fault.getFault() != null)
              sb.append(fault.getFault().getClass().getName());
View Full Code Here

Examples of com.vmware.vim25.TaskInfo

            // wait if there are already VM snapshot task running
            ManagedObjectReference taskmgr = context.getServiceContent().getTaskManager();
            List<ManagedObjectReference> tasks = (ArrayList<ManagedObjectReference>)context.getVimClient().getDynamicProperty(taskmgr, "recentTask");
            for (ManagedObjectReference taskMor : tasks) {
                TaskInfo info = (TaskInfo) (context.getVimClient().getDynamicProperty(taskMor, "info"));
                if(info.getEntityName().equals(cmd.getVmName()) && info.getName().equalsIgnoreCase("CreateSnapshot_Task")){
                    s_logger.debug("There is already a VM snapshot task running, wait for it");
                    context.getVimClient().waitForTask(taskMor);
                }
            }
View Full Code Here

Examples of com.vmware.vim25.TaskInfo

            // wait if there are already VM revert task running
            ManagedObjectReference taskmgr = context.getServiceContent().getTaskManager();
            List<ManagedObjectReference> tasks = (ArrayList<ManagedObjectReference>)context.getVimClient().getDynamicProperty(taskmgr, "recentTask");
            for (ManagedObjectReference taskMor : tasks) {
                TaskInfo info = (TaskInfo) (context.getVimClient().getDynamicProperty(taskMor, "info"));
                if(info.getEntityName().equals(cmd.getVmName()) && info.getName().equalsIgnoreCase("RevertToSnapshot_Task")){
                    s_logger.debug("There is already a VM snapshot task running, wait for it");
                    context.getVimClient().waitForTask(taskMor);
                }
            }
View Full Code Here

Examples of gri.tasks.gui.TaskInfo

  class UpdateInfoListener implements ObjectActionListener {

    public void actionPerformed(ObjectAction action) {
      String s = action.getCommand();
      if (s.equals(ObjectAction.SELECT)) {
        TaskInfo taskInfo = (TaskInfo)action.getObject();
        infoPanel.setTask(taskInfo);
      }
    }
View Full Code Here

Examples of net.sourceforge.ganttproject.task.TaskInfo

          .getPriority() == 1 ? "/icons/task.gif"
          : "/icons/task2.gif");
      res = new ImageIcon(getClass().getResource(path));
      break;
    case 2: // info
      TaskInfo info = t.getTaskInfo();
      if (info != null) {
        if (info instanceof Delay) {
          int type = ((Delay) info).getType();
          if (type == Delay.NORMAL)
            res = new ImageIcon(getClass().getResource(
View Full Code Here

Examples of org.apache.hadoop.hive.ql.history.HiveHistory.TaskInfo

        || recType == RecordTypes.TaskProgress) {

      String jobid = values.get(Keys.QUERY_ID.name());
      String taskid = values.get(Keys.TASK_ID.name());
      String key = jobid + ":" + taskid;
      TaskInfo ti;
      if (taskInfoMap.containsKey(key)) {
        ti = taskInfoMap.get(key);
        ti.hm.putAll(values);
      } else {
        ti = new TaskInfo();
        ti.hm = new HashMap<String, String>();
        ti.hm.putAll(values);
        taskInfoMap.put(key, ti);

      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.