Examples of tryEval()


Examples of com.cloud.bridge.util.JsonAccessor.tryEval()

    String responseName, String responseObjName, Class<T> responseClzthrows Exception {
   
    assert(responseName != null);
   
    JsonAccessor json = execute(cmd, apiKey, secretKey);
    if(followToAsyncResult && json.tryEval(responseName + ".jobid") != null) {
      long startMs = System.currentTimeMillis();
          while(System.currentTimeMillis() -  startMs < _pollTimeoutMs) {
        CloudStackCommand queryJobCmd = new CloudStackCommand("queryAsyncJobResult");
            queryJobCmd.setParam("jobId", json.getAsString(responseName + ".jobid"));
           
View Full Code Here

Examples of com.cloud.bridge.util.JsonAccessor.tryEval()

        CloudStackCommand queryJobCmd = new CloudStackCommand("queryAsyncJobResult");
            queryJobCmd.setParam("jobId", json.getAsString(responseName + ".jobid"));
           
            JsonAccessor queryAsyncJobResponse = execute(queryJobCmd, apiKey, secretKey);

          if(queryAsyncJobResponse.tryEval("queryasyncjobresultresponse") != null) {
            int jobStatus = queryAsyncJobResponse.getAsInt("queryasyncjobresultresponse.jobstatus");
            switch(jobStatus) {
            case 2:
                throw new Exception(queryAsyncJobResponse.getAsString("queryasyncjobresultresponse.jobresult.errortext") + " Error Code - " +
                queryAsyncJobResponse.getAsString("queryasyncjobresultresponse.jobresult.errorcode") );
View Full Code Here

Examples of com.cloud.bridge.util.JsonAccessor.tryEval()

        Class<T> responseClz) throws Exception {

        assert (responseName != null);

        JsonAccessor json = execute(cmd, apiKey, secretKey);
        if (followToAsyncResult && json.tryEval(responseName + ".jobid") != null) {
            long startMs = System.currentTimeMillis();
            while (System.currentTimeMillis() - startMs < _pollTimeoutMs) {
                CloudStackCommand queryJobCmd = new CloudStackCommand("queryAsyncJobResult");
                queryJobCmd.setParam("jobId", json.getAsString(responseName + ".jobid"));
View Full Code Here

Examples of com.cloud.bridge.util.JsonAccessor.tryEval()

                CloudStackCommand queryJobCmd = new CloudStackCommand("queryAsyncJobResult");
                queryJobCmd.setParam("jobId", json.getAsString(responseName + ".jobid"));

                JsonAccessor queryAsyncJobResponse = execute(queryJobCmd, apiKey, secretKey);

                if (queryAsyncJobResponse.tryEval("queryasyncjobresultresponse") != null) {
                    int jobStatus = queryAsyncJobResponse.getAsInt("queryasyncjobresultresponse.jobstatus");
                    switch (jobStatus) {
                        case 2:
                            throw new Exception(queryAsyncJobResponse.getAsString("queryasyncjobresultresponse.jobresult.errortext") + " Error Code - " +
                                queryAsyncJobResponse.getAsString("queryasyncjobresultresponse.jobresult.errorcode"));
View Full Code Here

Examples of com.cloud.bridge.util.JsonAccessor.tryEval()

    String responseName, String responseObjName, Class<T> responseClzthrows Exception {
   
    assert(responseName != null);
   
    JsonAccessor json = execute(cmd, apiKey, secretKey);
    if(followToAsyncResult && json.tryEval(responseName + ".jobid") != null) {
      long startMs = System.currentTimeMillis();
          while(System.currentTimeMillis() -  startMs < _pollTimeoutMs) {
        CloudStackCommand queryJobCmd = new CloudStackCommand("queryAsyncJobResult");
            queryJobCmd.setParam("jobId", json.getAsString(responseName + ".jobid"));
           
View Full Code Here

Examples of com.cloud.bridge.util.JsonAccessor.tryEval()

        CloudStackCommand queryJobCmd = new CloudStackCommand("queryAsyncJobResult");
            queryJobCmd.setParam("jobId", json.getAsString(responseName + ".jobid"));
           
            JsonAccessor queryAsyncJobResponse = execute(queryJobCmd, apiKey, secretKey);

          if(queryAsyncJobResponse.tryEval("queryasyncjobresultresponse") != null) {
            int jobStatus = queryAsyncJobResponse.getAsInt("queryasyncjobresultresponse.jobstatus");
            switch(jobStatus) {
            case 2:
                throw new Exception(queryAsyncJobResponse.getAsString("queryasyncjobresultresponse.jobresult.errorcode") + " " +
                  queryAsyncJobResponse.getAsString("queryasyncjobresultresponse.jobresult.errortext"));
View Full Code Here

Examples of com.cloud.bridge.util.JsonAccessor.tryEval()

    String responseName, String responseObjName, Class<T> responseClzthrows Exception {
   
    assert(responseName != null);
   
    JsonAccessor json = execute(cmd, apiKey, secretKey);
    if(followToAsyncResult && json.tryEval(responseName + ".jobid") != null) {
      long startMs = System.currentTimeMillis();
          while(System.currentTimeMillis() -  startMs < _pollTimeoutMs) {
        CloudStackCommand queryJobCmd = new CloudStackCommand("queryAsyncJobResult");
            queryJobCmd.setParam("jobId", json.getAsString(responseName + ".jobid"));
           
View Full Code Here

Examples of com.cloud.bridge.util.JsonAccessor.tryEval()

        CloudStackCommand queryJobCmd = new CloudStackCommand("queryAsyncJobResult");
            queryJobCmd.setParam("jobId", json.getAsString(responseName + ".jobid"));
           
            JsonAccessor queryAsyncJobResponse = execute(queryJobCmd, apiKey, secretKey);

          if(queryAsyncJobResponse.tryEval("queryasyncjobresultresponse") != null) {
            int jobStatus = queryAsyncJobResponse.getAsInt("queryasyncjobresultresponse.jobstatus");
            switch(jobStatus) {
            case 2:
                throw new Exception(queryAsyncJobResponse.getAsString("queryasyncjobresultresponse.jobresult.errorcode") + " " +
                  queryAsyncJobResponse.getAsString("queryasyncjobresultresponse.jobresult.errortext"));
View Full Code Here

Examples of com.cloud.bridge.util.JsonAccessor.tryEval()

    String responseName, String responseObjName, Class<T> responseClzthrows Exception {
   
    assert(responseName != null);
   
    JsonAccessor json = execute(cmd, apiKey, secretKey);
    if(followToAsyncResult && json.tryEval(responseName + ".jobid") != null) {
      long startMs = System.currentTimeMillis();
          while(System.currentTimeMillis() -  startMs < _pollTimeoutMs) {
        CloudStackCommand queryJobCmd = new CloudStackCommand("queryAsyncJobResult");
            queryJobCmd.setParam("jobId", json.getAsString(responseName + ".jobid"));
           
View Full Code Here

Examples of com.cloud.bridge.util.JsonAccessor.tryEval()

        CloudStackCommand queryJobCmd = new CloudStackCommand("queryAsyncJobResult");
            queryJobCmd.setParam("jobId", json.getAsString(responseName + ".jobid"));
           
            JsonAccessor queryAsyncJobResponse = execute(queryJobCmd, apiKey, secretKey);

          if(queryAsyncJobResponse.tryEval("queryasyncjobresultresponse") != null) {
            int jobStatus = queryAsyncJobResponse.getAsInt("queryasyncjobresultresponse.jobstatus");
            switch(jobStatus) {
            case 2:
                throw new Exception(queryAsyncJobResponse.getAsString("queryasyncjobresultresponse.jobresult.errorcode") + " " +
                  queryAsyncJobResponse.getAsString("queryasyncjobresultresponse.jobresult.errortext"));
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.