Class TaskHandle
java.lang.Object
com.google.appengine.api.taskqueue.TaskHandle
- All Implemented Interfaces:
Serializable
Created from
Queue.add(TaskOptions)
. Contains the task name (generated if otherwise
unspecified), task ETA (computed if not specified) and queue name. The queue name and task name
uniquely identify the task for an application.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTaskHandle
(TaskOptions options, String queueName) TaskHandle
(String name, String queueName, long etaMillis) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Attempts to decode thepayload
byte array in ouroptions
into a list ofMap.Entry<String, String>
.long
Returns a time comparable toSystem.currentTimeMillis()
when this task is scheduled for execution.getName()
Returns the name of this task.byte[]
Returns binary payload data of this task.Returns the name of the queue that this task was submitted into.Returns number of leases that had been performed on this task.getTag()
Returns tag of this task.byte[]
Returns tag of this task.int
hashCode()
toString()
-
Constructor Details
-
TaskHandle
-
TaskHandle
Deprecated.
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
toString
-
getName
Returns the name of this task. This may have been generated by a call toQueue.add()
if the name was not otherwise specified. -
getQueueName
Returns the name of the queue that this task was submitted into. -
getEtaMillis
public long getEtaMillis()Returns a time comparable toSystem.currentTimeMillis()
when this task is scheduled for execution. -
getRetryCount
Returns number of leases that had been performed on this task. Can returnnull
. -
getPayload
public byte[] getPayload()Returns binary payload data of this task. Can returnnull
. -
getTag
Returns tag of this task. Can returnnull
.- Throws:
UnsupportedEncodingException
-
getTagAsBytes
public byte[] getTagAsBytes()Returns tag of this task. Can returnnull
. -
extractParams
public List<Map.Entry<String,String>> extractParams() throws UnsupportedEncodingException, UnsupportedOperationExceptionAttempts to decode thepayload
byte array in ouroptions
into a list ofMap.Entry<String, String>
.- Throws:
UnsupportedEncodingException
- if the payload cannot be decoded as aapplication/x-www-form-urlencoded
string.UnsupportedOperationException
- if theoptions
has no payload or the payload bytes could not be interpreted as application/x-www-form-urlencoded key-value pairs.
-
TaskHandle(TaskOptions, String)