Package qat.parser

Examples of qat.parser.AgentInstance


      // 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
        setProperty(result,agentInstance.CHECKFILE(filename.toString()));
    }
    catch (Exception e) {
      printError(CHECKFILE,"Problem processing CHECKFILE command ("+e.toString()+") :",currToken);
    }
  }
View Full Code Here


      QASHToken agentID = resolveExpression(getTokensUntil(COMMA));
      QASHToken filename = resolveExpression(getTokensUntil(RIGHT_PARENTHESIS));

      setStatusText(QASHConstants.getTokenValue(DELFILE),filename.toString());

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

      QASHToken agentID = resolveExpression(getTokensUntil(COMMA));
      QASHToken filename = resolveExpression(resolveExpression(getTokensUntil(RIGHT_PARENTHESIS)));

      setStatusText(QASHConstants.getTokenValue(MKDIR),filename.toString());

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

   * Looks through currently running agents for an identifier matching processID.
   * Returns the matching AgentInstance, or null if it wasn't found.
   */
  private AgentInstance getAgentRunningProcess(String processID) {
    try {
      AgentInstance agentInstance;
      for (Enumeration<AgentInstance> e = qashProperties.getActiveAgents() ; e.hasMoreElements() ;) {
        agentInstance = (AgentInstance)e.nextElement();
        if (agentInstance.isHandlingProcess(processID)) {
          return agentInstance;
        }
      }
    }
    catch(Exception e) {
View Full Code Here

  /**
   * Looks through currently running agents for an identifier matching zipID.
   * Returns the matching AgentInstance, or null if it wasn't found.
   */
  private AgentInstance getAgentForZip(String zipID) {
    AgentInstance agentInstance;
    for (Enumeration<AgentInstance> e = qashProperties.getActiveAgents() ; e.hasMoreElements() ;) {
      agentInstance = (AgentInstance)e.nextElement();
      if (agentInstance.isHandlingZip(zipID)) {
        return agentInstance;
      }
    }
    return null;
  }
View Full Code Here

    // -- remote
    int agentCount = Integer.parseInt(getProperty(Common.AGENT_COUNT,"0"));
    for (int i = 1; i <= agentCount; i++) {
      try {
        AgentInstance agent = new AgentInstance(getProperty("agent"+i+".host"),
            new Integer(getProperty("agent"+i+".port")),
            ".",
            inEvaluationMode());
        String statusCode = agent.EXEC_CLASS(classLoader, className);
        setProperty("0",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

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.