Package com.google.appengine.api.taskqueue

Examples of com.google.appengine.api.taskqueue.TaskHandle.extractParams()


        String taskBaseName = groupTag + "_" + getTimeStampRandom();
        queue.add(withMethod(PULL).tag(taskBaseName).payload("foobar=baz", "UTF-8"));
        List<TaskHandle> tasks = queue.leaseTasks(LeaseOptions.Builder.withCountLimit(1).leasePeriod(1, TimeUnit.MINUTES));
        Assert.assertEquals(1, tasks.size());
        TaskHandle th = tasks.get(0);
        List<Map.Entry<String, String>> entries = th.extractParams();
        Assert.assertEquals(1, entries.size());
        Assert.assertEquals("foobar", entries.get(0).getKey());
        Assert.assertEquals("baz", entries.get(0).getValue());
    }
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.