Package com.google.appengine.api.labs.taskqueue

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


    // System.out.println("PRE_TASK_ADDING");
    Queue tq = QueueFactory.getQueue("onPositiveQueue");
    TaskOptions to = TaskOptions.Builder.url(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);
    // System.out.println("TASK_ADDED");
View Full Code Here


            TaskOptions url =
                TaskOptions.Builder.url(C2DMRetryServlet.URI)
                .param(C2DMessaging.PARAM_REGISTRATION_ID, token)
                .param(C2DMessaging.PARAM_COLLAPSE_KEY, collapseKey);
            if (delayWhileIdle) {
                url.param(PARAM_DELAY_WHILE_IDLE, "1");
            }
            for (String key: params.keySet()) {
                String[] values = (String[]) params.get(key);
                url.param(key, URLEncoder.encode(values[0], UTF8));
            }
View Full Code Here

            if (delayWhileIdle) {
                url.param(PARAM_DELAY_WHILE_IDLE, "1");
            }
            for (String key: params.keySet()) {
                String[] values = (String[]) params.get(key);
                url.param(key, URLEncoder.encode(values[0], UTF8));
            }
           
            // Task queue implements the exponential backoff
            long jitter = (int) Math.random() * C2DM_MAX_JITTER_MSEC;
            url.countdownMillis(jitter);
View Full Code Here

      if (cursor != null) {
        Queue queue = QueueFactory.getDefaultQueue();
        TaskOptions topt = TaskOptions.Builder.url("/migration");
        for (String rkey : res.keySet()) {
          if (!rkey.equals("cursor")) {
            topt = topt.param(rkey, ""+ res.get(rkey));
          }
        }
        queue.add(topt.param("cursor", cursor).param("num", ""+range).
          param("dir", direction).param("migration", migration));
      }
View Full Code Here

        for (String rkey : res.keySet()) {
          if (!rkey.equals("cursor")) {
            topt = topt.param(rkey, ""+ res.get(rkey));
          }
        }
        queue.add(topt.param("cursor", cursor).param("num", ""+range).
          param("dir", direction).param("migration", migration));
      }
    }
    catch (ClassNotFoundException e) {
      // e.printStackTrace();
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.