Package com.google.appengine.api.taskqueue

Examples of com.google.appengine.api.taskqueue.TaskOptions.param()


                taskOptions.param("corporationID", String.valueOf(character.getCorporationID()))
                        .param("corporationName", character.getCorporationName())
                        .param("corporationTicker", character.getCorporationTicker());
            }
            if (character.getAllianceID() != null) {
                taskOptions.param("allianceID", String.valueOf(character.getAllianceID()))
                        .param("allianceName", character.getAllianceName());
            }
            queue.add(taskOptions);
        }
    }
View Full Code Here


  public void addTaskToQueue(Map<String, String> params){
    Queue tq = QueueFactory.getQueue("onPositiveQueue");
    TaskOptions to = TaskOptions.Builder.withUrl(CONN_URL);
    for (String k : params.keySet()) {
      String val = params.get(k);
      to = to.param(k, val);
    }
    to = to.method(Method.POST);
    // to = to.taskName("task" + INIT + "count" + (-1));
    tq.add(to);
  }
View Full Code Here

        .header("Content-Type", "application/x-www-form-urlencoded; charset=utf-8")
        .param(PARAM_PROC_ID, processor.name);

    while (args.hasNext()) {
      for (int i = 0; i < batchSize - 1 && args.hasNext(); i++) {
        opts.param(PARAM_ARGS, args.next());
      }
      queue.add(opts);
      opts.removeParam(PARAM_ARGS);
    }
  }
View Full Code Here

    throws MalformedURLException, InterruptedException, ExecutionException {
    Queue queue = QueueFactory.getQueue(workId);
    TaskOptions options = TaskOptions.Builder.withUrl(url);
    options.method(Method.POST);
    for(String name : params.keySet()) {
      options.param(name, params.get(name));
    }
    options.header("Host", BackendServiceFactory.getBackendService().getBackendAddress("worker",0));
    queue.add(options);      
  }
 
View Full Code Here

    throws MalformedURLException, InterruptedException, ExecutionException {
    Queue queue = QueueFactory.getQueue(workId);
    TaskOptions options = TaskOptions.Builder.withUrl(url);
    options.method(Method.POST);
    for(String name : params.keySet()) {
      options.param(name, params.get(name));
    }
    queue.add(options);
  }
 
}
View Full Code Here

            TaskOptions options =
                    TaskOptions.Builder
                        .withUrl("/GenerateNicoliveIndex")
                        .method(Method.POST);
            for (Key key : keys) {
                options = options.param("keys[]", Datastore.keyToString(key));
            }

            QueueFactory.getQueue("generate-nicoliveindex").add(options);
        }
    }
View Full Code Here

                    }
                    break;
                case "params":
                    if (value instanceof Map) {
                        for (Entry<String, Object> option : ((Map<String, Object>)value).entrySet()) {
                            options = options.param(option.getKey(), String.valueOf(option.getValue()));
                        }
                    } else {
                        throw new RuntimeException("The params key/value pairs should be passed as a map.");
                    }
                    break;
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.