Package qat.parser

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


      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

      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

      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

      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

      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

  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

   */
  private void autoClean() {
    printDebug("Processing AUTOCLEAN of "+qashProperties.getActiveAgentCount()+" agent(s)");
    // now call kill for all active agents
    if (!inEvaluationMode()) {
      AgentInstance agent=null;
      for (Enumeration<AgentInstance> agentList = qashProperties.getActiveAgents() ; agentList.hasMoreElements() ;) {
        try {
          agent = (AgentInstance)agentList.nextElement();
          agent.KILLSTARTEDPROCESSES();
        }
        catch (Exception e) {
          printError(3,"Error during AUTOCLEAN of one or more agent processes - may need restart of agents!"+" :"+e.toString());
        }
      }
View Full Code Here

      // check that this agentID is defined
      if (agentID==null) {
        throw new Exception("agentID Identifier not defined");
      }

      AgentInstance agentInstance = (AgentInstance)qashProperties.getActiveAgent(new Integer(agentID.toString()));
      if (agentInstance==null)
        throw new Exception("Unknown agentID");
      else
        agentInstance.GETFILE(src.toString(),dest.toString());
    }
    catch (Exception e) {
      printError(GETFILE,"Problem processing GETFILE command ("+e.toString()+") :",currToken);
    }
  }
View Full Code Here

      // check that this agentID is defined
      if (agentID==null) {
        throw new Exception("agentID Identifier not defined");
      }

      AgentInstance agentInstance = (AgentInstance)qashProperties.getActiveAgent(new Integer(agentID.toString()));
      if (agentInstance==null)
        throw new Exception("Unknown agentID");
      else
        agentInstance.SENDFILE(src.toString(),dest.toString());
    }
    catch (Exception e) {
      printError(SENDFILE,"Problem processing SENDFILE command ("+e.toString()+") :",currToken);
    }
  }
View Full Code Here

TOP

Related Classes of qat.parser.AgentInstance

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.