TaskOptions (Google App Engine API for Java)


Class TaskOptions

  • java.lang.Object
    • com.google.appengine.api.taskqueue.TaskOptions
  • All Implemented Interfaces:

    public final class TaskOptions
    extends java.lang.Object
    implements java.io.Serializable
    Contains various options for a task following the builder pattern. Calls to TaskOptions methods may be chained to specify multiple options in the one TaskOptions object.

    taskOptions can have either TaskOptions.Method PULL or a PUSH-related method, e.g. POST, GET, ... Tasks with PULL method can only be added into a PULL queue and PUSH tasks can only be added into a PUSH queue.

    Notes on usage:
    The recommended way to instantiate a TaskOptions object is to statically import TaskOptions.Builder.* and invoke a static creation method followed by an instance mutator (if needed):

     import static com.google.appengine.api.taskqueue.TaskOptions.Builder.*;
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      TaskOptions clearParams()
      Clears the parameters.
      TaskOptions countdownMillis(long countdownMillis)
      Set the number of milliseconds delay before execution of the task.
      boolean equals(java.lang.Object obj) 
      TaskOptions etaMillis(long etaMillis)
      Sets the approximate absolute time to execute.
      java.util.Map<java.lang.String,java.util.List<byte[]>> getByteArrayParams()
      Returns a copy of the task's byte-array-valued parameters as a map from each parameter name to a list of values for that name.
      java.lang.Long getCountdownMillis()
      Returns the delay to apply to the submitted time.
      java.lang.Long getEtaMillis()
      Returns the specified ETA for a task.
      java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaders()
      Returns a copy of the task's headers as a map from each header name to a list of values for that header name.
      TaskOptions.Method getMethod()
      Returns the method used for this task.
      byte[] getPayload()
      Returns the live payload for the task, not a copy.
      RetryOptions getRetryOptions()
      Returns a copy of the retry options for a task.
      java.util.Map<java.lang.String,java.util.List<java.lang.String>> getStringParams()
      Returns a copy of the task's string-valued parameters as a map from each parameter name to a list of values for that name.
      java.lang.String getTag()
      Returns the tag for a task.
      byte[] getTagAsBytes()
      Returns the live tag bytes for a task, not a copy.
      java.lang.String getTaskName()
      Returns the task name.
      java.lang.String getUrl() 
      int hashCode() 
      TaskOptions header(java.lang.String headerName, java.lang.String value)
      Adds a header name/value pair.
      TaskOptions headers(java.util.Map<java.lang.String,java.lang.String> headers)
      Replaces the existing headers with the provided header name/value mapping.
      TaskOptions method(TaskOptions.Method method)
      Set the method used for this task.