Package ru.vassaev.core.thread

Examples of ru.vassaev.core.thread.Process.start()


        else r = null;
      Process p = prcs == null ? new Process() : prcs.occupyOrNew();
      try {
        p.setTarget(new Prc());
        p.setName("QUEUE");
        p.start(cntx);
        p.waitStartTarget();
        if (r != null)
          xr.parse(new InputSource(r));
      } finally {
        queue.put(new Data(TYPE.END));
View Full Code Here


      Socket s = ss.accept();
      Process prc = prcs.occupy();
      prc.setCallBackOnEndProcess(finish);
      System.out.println("Created link " + Sockets.getNameLink(s));
      prc.setTarget(new Target());
      prc.start(s);
     
    }
  }

  private void process_client() throws UnknownHostException, IOException {
View Full Code Here

    System.out.println("++++3+++PRCPOOL.BusySize = " + prcs.getBusySize());
    Process prc = prcs.occupy();
    prc.setCallBackOnEndProcess(finish);
    System.out.println("Created link " + Sockets.getNameLink(s));
    prc.setTarget(new Target());
    prc.start(s);
  }

  public State process(Context cntx) throws SysException, TaskException {
    paramsValidateAndPrepare(cntx);
    try {
View Full Code Here

        tr = prcs.occupy();
        // старт обработки;
        try {
          SingleProccesor target = new SingleProccesor(msg, this);
          tr.setTarget(target);
          tr.start();
        } catch (RuntimeException e) {
          prcs.free(tr);
          freeMsg(msg);
          e.printStackTrace();
        } catch (SysException e) {
View Full Code Here

      try {
        synchronized(sync) {
          prc = prcs.occupyWait();
          prc.setTarget(rm);
          prc.setName("READ_MSG_" + cntx.id_task);
          prc.start(s.getInputStream());
          sync.wait(timeout);
          result = rm.getResultMsg();
          if (result == null) {
            prc.kill();
            throw new TaskException(State.DONE_TOUT, "Timeout of receiving message");
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.