com.amazonaws.services.simpleworkflow.flow.worker
Class DecisionTaskHandler
java.lang.Object
com.amazonaws.services.simpleworkflow.flow.worker.DecisionTaskHandler
- Direct Known Subclasses:
- AsyncDecisionTaskHandler
public abstract class DecisionTaskHandler
- extends Object
Base class for workflow task handlers. Extend this class to implement custom
deciders that can be executed using a
WorkflowTaskPollingExecutorService
.
- See Also:
WorkflowTaskPollingExecutorService
DecisionTaskHandler
public DecisionTaskHandler()
handleDecisionTask
public abstract RespondDecisionTaskCompletedRequest handleDecisionTask(Iterator<DecisionTask> decisionTaskIterator)
throws Exception
- The implementation should be called when a polling SWF Decider receives a
new WorkflowTask. Later, that decider should call one of
#respondWorkflowTaskCompleted(String, Transition, AmazonSimpleWorkflow)
or
#respondWorkflowTaskFailed(String, int, String, Map, AmazonSimpleWorkflow)
.
- Parameters:
workflowTask
- The decision task to handle. The reason for more then one task
being received is pagination of the history. All tasks in the
iterator contain the same information but different pages of
the history. The tasks are loaded lazily when
Iterator.next()
is called. It is expected that the
method implementation aborts decision by rethrowing any
exception from Iterator.next()
.
- Throws:
Exception
getAsynchronousThreadDump
public abstract List<AsyncTaskInfo> getAsynchronousThreadDump(Iterator<DecisionTask> decisionTaskIterator)
throws Exception
- Throws:
Exception
getAsynchronousThreadDumpAsString
public abstract String getAsynchronousThreadDumpAsString(Iterator<DecisionTask> decisionTaskIterator)
throws Exception
- Throws:
Exception
loadWorkflowThroughReplay
public abstract Object loadWorkflowThroughReplay(Iterator<DecisionTask> decisionTaskIterator)
throws Exception
- Throws:
Exception
Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.