Examples of AgentInstance


Examples of qat.parser.AgentInstance

   */
  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

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

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

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

Examples of qat.parser.AgentInstance

      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

Examples of qat.parser.AgentInstance

      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

Examples of qat.parser.AgentInstance

   * 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

Examples of qat.parser.AgentInstance

  /**
   * 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

Examples of qat.parser.AgentInstance

    // -- 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
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.