Examples of AgentInstance


Examples of qat.parser.AgentInstance

        // form 2 of the allowed syntax
        command = resolveExpression(expression);
        timeout = new QASHToken("0",QASHToken.TT_NUMBER,command.line);
      }       

      AgentInstance agentInstance = (AgentInstance)qashProperties.getActiveAgent(new Integer(agentID.toString()));
      if (agentInstance==null)
        throw new Exception("Unknown agentID");      setProperty(processID.toString(),agentInstance.CMDSTART(strToArray(command.toString()), timeout.toString()));
    }
    catch (Exception e) {
      printError(CMDSTART,"Problem processing CMDSTART command ("+e.toString()+") :",currToken);
    }
  }
View Full Code Here

Examples of qat.parser.AgentInstance

      processID = getToken(processIDName);

      setStatusText(QASHConstants.getTokenValue(CMDSTOP),processIDName.toString());

      AgentInstance agentInstance = getAgentRunningProcess(processID.toString());
      if (agentInstance==null)
        throw new Exception("Unknown processID");
      if (statusID!=null) {
        //form 2
        setProperty(statusID.toString(),agentInstance.CMDSTOP(processID.toString()));
      }
      else {
        // form 1
        agentInstance.CMDSTOP(processID.toString());
      }
    }
    catch (Exception e) {
      printError(CMDSTOP,"Problem processing CMDSTOP command ("+e.toString()+") :",currToken);
    }
View Full Code Here

Examples of qat.parser.AgentInstance

      QASHToken processID = getToken(processIDName);
      QASHToken processStatus = resolveName(getTokensUntil(RIGHT_PARENTHESIS));

      setStatusText(QASHConstants.getTokenValue(CMDSTATUS),processIDName.toString());

      AgentInstance agentInstance = getAgentRunningProcess(processID.toString());

      if (agentInstance==null)
        throw new Exception("Unknown processID");

      String statusCode = agentInstance.CMDSTATUS(processID.toString());
      setProperty(processStatus.toString(),statusCode);

      // now print out a message if the status was timed out
      int value = Integer.parseInt(statusCode);
      if (value == qat.agent.ExecProcess.TIMEDOUT_STATE) {
View Full Code Here

Examples of qat.parser.AgentInstance

      //log.info("processID>>>>>>>>>"+processID);
      //log.info("---------------------");

      setStatusText(QASHConstants.getTokenValue(CMDGETTRACE),processIDName.toString());

      AgentInstance agentInstance = getAgentRunningProcess(processID.toString());

      if (agentInstance==null)
        throw new Exception("Unknown processID");
      agentInstance.CMDGETTRACE(processID.toString(),
          qashProperties.getProjectResultsDirectory()+File.separator+
          Common.getUniqueTestIdentifier(QASHFileName)+"_"+processIDName.toString());
      addToIncludeList(INTERNAL_TRACE_LIST,processIDName.toString());
    }
    catch (Exception e) {
View Full Code Here

Examples of qat.parser.AgentInstance

      QASHToken command=null;
      command = resolveExpression(expression);

      setStatusText(QASHConstants.getTokenValue(DAEMONSTART),command.toString());

      AgentInstance agentInstance = (AgentInstance)qashProperties.getActiveAgent(new Integer(agentID.toString()));     

      if (agentInstance==null)
        throw new Exception("Unknown agentID");
      agentInstance.DAEMONSTART(strToArray(command.toString()));
    }
    catch (Exception e) {
      printError(DAEMONSTART,"Problem processing DAEMONSTART command ("+e.toString()+") :",currToken);
    }
  }
View Full Code Here

Examples of qat.parser.AgentInstance

      QASHToken processIDName = resolveName(getTokensUntil(COMMA));
      QASHToken result        = resolveName(getTokensUntil(COMMA));
      QASHToken grepString    = resolveExpression(getTokensUntil(RIGHT_PARENTHESIS));
      QASHToken processID     = getToken(processIDName);

      setStatusText(QASHConstants.getTokenValue(ENVTRACECONTAINS),grepString.toString());      AgentInstance agentInstance = getAgentRunningProcess(processID.toString());
      if (agentInstance==null)
        throw new Exception("Unknown processID");
      String resultCode;
      resultCode = agentInstance.ENVTRACECONTAINS(processID.toString(),
          qashProperties.getProjectResultsDirectory()+File.separator+
          Common.getUniqueTestIdentifier(QASHFileName)+"_"+processIDName.toString(),
          grepString.toString());
      setProperty(result.toString(),resultCode);
    }
View Full Code Here

Examples of qat.parser.AgentInstance

      setStatusText(QASHConstants.getTokenValue(STDOUTCONTAINS),grepString.toString());

      if (processIDName==null)
        throw new Exception("Invalid process ID");
      AgentInstance agentInstance = getAgentRunningProcess(processID.toString());
      if (agentInstance==null)
        throw new Exception("Unknown processID");
      String resultCode;
      resultCode = agentInstance.STDOUTCONTAINS(processID.toString(),
          qashProperties.getProjectResultsDirectory()+File.separator+
          Common.getUniqueTestIdentifier(QASHFileName)+"_"+processIDName.toString(),
          grepString.toString());
      setProperty(result.toString(),resultCode);
    }
View Full Code Here

Examples of qat.parser.AgentInstance

      setStatusText(QASHConstants.getTokenValue(STDERRCONTAINS),grepString.toString());

      if (processIDName==null)
        throw new Exception("Invalid process ID");
      AgentInstance agentInstance = getAgentRunningProcess(processID.toString());
      if (agentInstance==null)
        throw new Exception("Unknown processID");
      String resultCode;
      resultCode = agentInstance.STDERRCONTAINS(processID.toString(),
          qashProperties.getProjectResultsDirectory()+File.separator+
          Common.getUniqueTestIdentifier(QASHFileName)+"_"+processIDName.toString(),
          grepString.toString());
      setProperty(result.toString(),resultCode);
    }
View Full Code Here

Examples of qat.parser.AgentInstance

      setStatusText(QASHConstants.getTokenValue(GETTRACEPATHS),processIDName.toString());

      if (processIDName==null)
        throw new Exception("Invalid process ID");
      AgentInstance agentInstance = getAgentRunningProcess(processID.toString());
      if (agentInstance==null)
        throw new Exception("Unknown process ID");
      String results[] = agentInstance.GETTRACEPATHS(processID.toString());
      setProperty(envFileName.toString(),results[0]);
      setProperty(stdoutFileName.toString(),results[1]);
      setProperty(stderrFileName.toString(),results[2]);
    }
    catch (Exception e) {
View Full Code Here

Examples of qat.parser.AgentInstance

  private void processCMDCLEAN() {
    try {
      List<QASHToken> expression = readExpression(false, true);
      QASHToken processIDName = resolveName(expression);
      QASHToken processID = getToken(processIDName);
      AgentInstance agentInstance = getAgentRunningProcess(processID.toString());

      setStatusText(QASHConstants.getTokenValue(CMDCLEAN),processIDName.toString());

      if (agentInstance==null)
        throw new Exception("Unknown processID :"+processID.toString());
      agentInstance.CMDCLEAN(processID.toString());
      removeProperty(processIDName.toString());
    }
    catch (Exception e) {
      printError(CMDCLEAN,"Error processing CMDCLEAN command ("+e.toString()+") :",currToken);
    }
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.