Did this page help you?

   Yes   No   Tell us about it...

com.amazonaws.services.simpleworkflow.model
Class PollForDecisionTaskRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.simpleworkflow.model.PollForDecisionTaskRequest

public class PollForDecisionTaskRequest
extends AmazonWebServiceRequest

Container for the parameters to the PollForDecisionTask operation.

Used by deciders to get a DecisionTask from the specified decision taskList . A decision task may be returned for any open workflow execution that is using the specified task list. The task includes a paginated view of the history of the workflow execution. The decider should use the workflow type and the history to determine how to properly handle the task.

This action initiates a long poll, where the service holds the HTTP connection open and responds as soon a task becomes available. If no decision task is available in the specified task list before the timeout of 60 seconds expires, an empty result is returned. An empty result, in this context, means that a DecisionTask is returned, but that the value of taskToken is an empty string.

IMPORTANT: Deciders should set their client side socket timeout to at least 70 seconds (10 seconds higher than the timeout).

IMPORTANT: Because the number of workflow history events for a single workflow execution might be very large, the result returned might be split up across a number of pages. To retrieve subsequent pages, make additional calls to PollForDecisionTask using the nextPageToken returned by the initial call. Note that you do not call GetWorkflowExecutionHistory with this nextPageToken. Instead, call PollForDecisionTask again.

See Also:
AmazonSimpleWorkflow.pollForDecisionTask(PollForDecisionTaskRequest)

Constructor Summary
PollForDecisionTaskRequest()
           
 
Method Summary
 boolean equals(Object obj)
           
 String getDomain()
          The name of the domain containing the task lists to poll.
 String getIdentity()
          Identity of the decider making the request, which is recorded in the DecisionTaskStarted event in the workflow history.
 Integer getMaximumPageSize()
          The maximum number of history events returned in each page.
 String getNextPageToken()
          If on a previous call to this method a NextPageToken was returned, the results are being paginated.
 Boolean getReverseOrder()
          When set to true, returns the events in reverse order.
 TaskList getTaskList()
          Specifies the task list to poll for decision tasks.
 int hashCode()
           
 Boolean isReverseOrder()
          When set to true, returns the events in reverse order.
 void setDomain(String domain)
          The name of the domain containing the task lists to poll.
 void setIdentity(String identity)
          Identity of the decider making the request, which is recorded in the DecisionTaskStarted event in the workflow history.
 void setMaximumPageSize(Integer maximumPageSize)
          The maximum number of history events returned in each page.
 void setNextPageToken(String nextPageToken)
          If on a previous call to this method a NextPageToken was returned, the results are being paginated.
 void setReverseOrder(Boolean reverseOrder)
          When set to true, returns the events in reverse order.
 void setTaskList(TaskList taskList)
          Specifies the task list to poll for decision tasks.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 PollForDecisionTaskRequest withDomain(String domain)
          The name of the domain containing the task lists to poll.
 PollForDecisionTaskRequest withIdentity(String identity)
          Identity of the decider making the request, which is recorded in the DecisionTaskStarted event in the workflow history.
 PollForDecisionTaskRequest withMaximumPageSize(Integer maximumPageSize)
          The maximum number of history events returned in each page.
 PollForDecisionTaskRequest withNextPageToken(String nextPageToken)
          If on a previous call to this method a NextPageToken was returned, the results are being paginated.
 PollForDecisionTaskRequest withReverseOrder(Boolean reverseOrder)
          When set to true, returns the events in reverse order.
 PollForDecisionTaskRequest withTaskList(TaskList taskList)
          Specifies the task list to poll for decision tasks.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PollForDecisionTaskRequest

public PollForDecisionTaskRequest()
Method Detail

getDomain

public String getDomain()
The name of the domain containing the task lists to poll.

Constraints:
Length: 1 - 256

Returns:
The name of the domain containing the task lists to poll.

setDomain

public void setDomain(String domain)
The name of the domain containing the task lists to poll.

Constraints:
Length: 1 - 256

Parameters:
domain - The name of the domain containing the task lists to poll.

withDomain

public PollForDecisionTaskRequest withDomain(String domain)
The name of the domain containing the task lists to poll.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 256

Parameters:
domain - The name of the domain containing the task lists to poll.
Returns:
A reference to this updated object so that method calls can be chained together.

getTaskList

public TaskList getTaskList()
Specifies the task list to poll for decision tasks.

The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (- |  - ?). Also, it must not contain the literal string "arn".

Returns:
Specifies the task list to poll for decision tasks.

The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (- |  - ?). Also, it must not contain the literal string "arn".


setTaskList

public void setTaskList(TaskList taskList)
Specifies the task list to poll for decision tasks.

The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (- |  - ?). Also, it must not contain the literal string "arn".

Parameters:
taskList - Specifies the task list to poll for decision tasks.

The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (- |  - ?). Also, it must not contain the literal string "arn".


withTaskList

public PollForDecisionTaskRequest withTaskList(TaskList taskList)
Specifies the task list to poll for decision tasks.

The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (- |  - ?). Also, it must not contain the literal string "arn".

Returns a reference to this object so that method calls can be chained together.

Parameters:
taskList - Specifies the task list to poll for decision tasks.

The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (- |  - ?). Also, it must not contain the literal string "arn".

Returns:
A reference to this updated object so that method calls can be chained together.

getIdentity

public String getIdentity()
Identity of the decider making the request, which is recorded in the DecisionTaskStarted event in the workflow history. This enables diagnostic tracing when problems arise. The form of this identity is user defined.

Constraints:
Length: 0 - 256

Returns:
Identity of the decider making the request, which is recorded in the DecisionTaskStarted event in the workflow history. This enables diagnostic tracing when problems arise. The form of this identity is user defined.

setIdentity

public void setIdentity(String identity)
Identity of the decider making the request, which is recorded in the DecisionTaskStarted event in the workflow history. This enables diagnostic tracing when problems arise. The form of this identity is user defined.

Constraints:
Length: 0 - 256

Parameters:
identity - Identity of the decider making the request, which is recorded in the DecisionTaskStarted event in the workflow history. This enables diagnostic tracing when problems arise. The form of this identity is user defined.

withIdentity

public PollForDecisionTaskRequest withIdentity(String identity)
Identity of the decider making the request, which is recorded in the DecisionTaskStarted event in the workflow history. This enables diagnostic tracing when problems arise. The form of this identity is user defined.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 256

Parameters:
identity - Identity of the decider making the request, which is recorded in the DecisionTaskStarted event in the workflow history. This enables diagnostic tracing when problems arise. The form of this identity is user defined.
Returns:
A reference to this updated object so that method calls can be chained together.

getNextPageToken

public String getNextPageToken()
If on a previous call to this method a NextPageToken was returned, the results are being paginated. To get the next page of results, repeat the call with the returned token and all other arguments unchanged. The nextPageToken returned by this action cannot be used with GetWorkflowExecutionHistory to get the next page. You must call PollForDecisionTask again (with the nextPageToken) to retrieve the next page of history records. Calling PollForDecisionTask with a nextPageToken will not return a new decision task..

Constraints:
Length: 0 - 2048

Returns:
If on a previous call to this method a NextPageToken was returned, the results are being paginated. To get the next page of results, repeat the call with the returned token and all other arguments unchanged. The nextPageToken returned by this action cannot be used with GetWorkflowExecutionHistory to get the next page. You must call PollForDecisionTask again (with the nextPageToken) to retrieve the next page of history records. Calling PollForDecisionTask with a nextPageToken will not return a new decision task..

setNextPageToken

public void setNextPageToken(String nextPageToken)
If on a previous call to this method a NextPageToken was returned, the results are being paginated. To get the next page of results, repeat the call with the returned token and all other arguments unchanged. The nextPageToken returned by this action cannot be used with GetWorkflowExecutionHistory to get the next page. You must call PollForDecisionTask again (with the nextPageToken) to retrieve the next page of history records. Calling PollForDecisionTask with a nextPageToken will not return a new decision task..

Constraints:
Length: 0 - 2048

Parameters:
nextPageToken - If on a previous call to this method a NextPageToken was returned, the results are being paginated. To get the next page of results, repeat the call with the returned token and all other arguments unchanged. The nextPageToken returned by this action cannot be used with GetWorkflowExecutionHistory to get the next page. You must call PollForDecisionTask again (with the nextPageToken) to retrieve the next page of history records. Calling PollForDecisionTask with a nextPageToken will not return a new decision task..

withNextPageToken

public PollForDecisionTaskRequest withNextPageToken(String nextPageToken)
If on a previous call to this method a NextPageToken was returned, the results are being paginated. To get the next page of results, repeat the call with the returned token and all other arguments unchanged. The nextPageToken returned by this action cannot be used with GetWorkflowExecutionHistory to get the next page. You must call PollForDecisionTask again (with the nextPageToken) to retrieve the next page of history records. Calling PollForDecisionTask with a nextPageToken will not return a new decision task..

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 2048

Parameters:
nextPageToken - If on a previous call to this method a NextPageToken was returned, the results are being paginated. To get the next page of results, repeat the call with the returned token and all other arguments unchanged. The nextPageToken returned by this action cannot be used with GetWorkflowExecutionHistory to get the next page. You must call PollForDecisionTask again (with the nextPageToken) to retrieve the next page of history records. Calling PollForDecisionTask with a nextPageToken will not return a new decision task..
Returns:
A reference to this updated object so that method calls can be chained together.

getMaximumPageSize

public Integer getMaximumPageSize()
The maximum number of history events returned in each page. The default is 100, but the caller can override this value to a page size smaller than the default. You cannot specify a page size greater than 100.

Constraints:
Range: 0 - 1000

Returns:
The maximum number of history events returned in each page. The default is 100, but the caller can override this value to a page size smaller than the default. You cannot specify a page size greater than 100.

setMaximumPageSize

public void setMaximumPageSize(Integer maximumPageSize)
The maximum number of history events returned in each page. The default is 100, but the caller can override this value to a page size smaller than the default. You cannot specify a page size greater than 100.

Constraints:
Range: 0 - 1000

Parameters:
maximumPageSize - The maximum number of history events returned in each page. The default is 100, but the caller can override this value to a page size smaller than the default. You cannot specify a page size greater than 100.

withMaximumPageSize

public PollForDecisionTaskRequest withMaximumPageSize(Integer maximumPageSize)
The maximum number of history events returned in each page. The default is 100, but the caller can override this value to a page size smaller than the default. You cannot specify a page size greater than 100.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 0 - 1000

Parameters:
maximumPageSize - The maximum number of history events returned in each page. The default is 100, but the caller can override this value to a page size smaller than the default. You cannot specify a page size greater than 100.
Returns:
A reference to this updated object so that method calls can be chained together.

isReverseOrder

public Boolean isReverseOrder()
When set to true, returns the events in reverse order. By default the results are returned in ascending order of the eventTimestamp of the events.

Returns:
When set to true, returns the events in reverse order. By default the results are returned in ascending order of the eventTimestamp of the events.

setReverseOrder

public void setReverseOrder(Boolean reverseOrder)
When set to true, returns the events in reverse order. By default the results are returned in ascending order of the eventTimestamp of the events.

Parameters:
reverseOrder - When set to true, returns the events in reverse order. By default the results are returned in ascending order of the eventTimestamp of the events.

withReverseOrder

public PollForDecisionTaskRequest withReverseOrder(Boolean reverseOrder)
When set to true, returns the events in reverse order. By default the results are returned in ascending order of the eventTimestamp of the events.

Returns a reference to this object so that method calls can be chained together.

Parameters:
reverseOrder - When set to true, returns the events in reverse order. By default the results are returned in ascending order of the eventTimestamp of the events.
Returns:
A reference to this updated object so that method calls can be chained together.

getReverseOrder

public Boolean getReverseOrder()
When set to true, returns the events in reverse order. By default the results are returned in ascending order of the eventTimestamp of the events.

Returns:
When set to true, returns the events in reverse order. By default the results are returned in ascending order of the eventTimestamp of the events.

toString

public String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.