Package center.task

Examples of center.task.State


      try {
        res.info.calculate(TimeState.getInstance(TimeState.Time.before, State.PROCESSING), res);
      } catch (Throwable e) {
        e.printStackTrace();
      }
      State st;
      try {
        st = po.process(res);
        res.setPrmByFullName("tsk", "STATUS_ID", st, false);
        res.info.calculate(TimeState.getInstance(TimeState.Time.after, State.PROCESSING), res);
      } catch (Throwable e) {
View Full Code Here


    return null;
  }

  public State process(Context cntx) throws TaskException, SysException,
      InterruptedException {
    State st = paramsValidateAndPrepare(cntx);
    if (st != null)
      return st;
    Process prc = Process.currentProcess();
    FindStringStream fss = new FindStringStream();
    fss.add("<%prm.", Prm.class);
View Full Code Here

      prcs = null;
    return null;
  }

  public State process(Context cntx) throws TaskException, SysException, InterruptedException {
    State st = paramsValidateAndPrepare(cntx);
    if (st != null)
      return st;
    File x;
    InputStream r = null;
    if (file instanceof File)
View Full Code Here

      Process prc = Process.currentProcess();
      while (true) {
        try {
          if (prc.isWillBreak())
            return State.BROKEN;
          State st = cntx.ta.getState(cntx.id_task);
          if (st.getType().equals(TypeOfState.LAST))
            return st;
          if (st.equals(State.BREAKING))
            return State.BROKEN;
        } catch (SysException ex) {
          ex.printStackTrace();
        }
        Thread.sleep(2000);//!!!
View Full Code Here

    }
    return null;
  }
 
  public State process(Context cntx) throws TaskException, SysException, InterruptedException {
    State st = paramsValidateAndPrepare(cntx);
    if (st != null)
      return st;
    Process prc = Process.currentProcess();
    URL url = null;
    URLConnection con = null;
View Full Code Here

    }
  }

  public State process(Context cntx) throws TaskException, SysException,
      InterruptedException {
    State st = paramsValidateAndPrepare(cntx);
    if (st != null)
      return st;
    Socket s = null;
    int catch_wait = 0;
    int catch_done = 0;
View Full Code Here

            continue;
          }

          long wait = Strings.parseIntegerNvl(cntx.getPrmByFullName("wait"), 60000);//!!!
          cntx.log(false, "Start waiting (" + wait + ")");
          State st = cntx_child.ta.waitFinished(cntx_child.id_subject, cntx_child.id_task, wait);
          cntx.log(false, "End waiting");
          if (State.DONE_ERR.equals(st)) {
            String rn = cntx.getPrmString("path_err");
            if (rn == null || rn.length() == 0) {
              cntx.log(false, d.getAbsolutePath(), " wasn't renamed");
View Full Code Here

      throw new TaskException(State.DONE_ERR, e);
    }
    return null;
  }
  public State process(Context cntx) throws SysException, TaskException {
    State st = paramsValidateAndPrepare(cntx);
    if (st != null)
      return st;
    ru.vassaev.core.thread.Process cur = ru.vassaev.core.thread.Process.currentProcess();
    ResultSet rs = new ResultSet(workbook);
    try {
View Full Code Here

    }
  }

  public State process(Context cntx) throws TaskException, SysException,
      InterruptedException {
    State st = paramsValidateAndPrepare(cntx);
    if (st != null)
      return st;
    Properties props = new Properties();
    Map<String, Object> prms = cntx.getGroupParams("mail.smtp");
    for (Map.Entry<String, Object> e : prms.entrySet()) {
View Full Code Here

    return null;
  }

  public State process(Context cntx) throws TaskException, SysException,
      InterruptedException {
    State st = paramsValidateAndPrepare(cntx);
    if (st != null)
      return st;
    String sql = select.getSQLExpression();
    cntx.log(false, "SELECT: ", sql);
View Full Code Here

TOP

Related Classes of center.task.State

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.