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 java.lang.Object
Base class for workflow task handlers. Extend this class to implement custom
deciders that can be executed using a
WorkflowTaskPollingExecutorService
.
- See Also:
WorkflowTaskPollingExecutorService
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DecisionTaskHandler
public DecisionTaskHandler()
handleDecisionTask
public abstract RespondDecisionTaskCompletedRequest handleDecisionTask(java.util.Iterator<DecisionTask> decisionTaskIterator)
throws java.lang.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:
java.lang.Exception
getAsynchronousThreadDump
public abstract java.util.List<AsyncTaskInfo> getAsynchronousThreadDump(java.util.Iterator<DecisionTask> decisionTaskIterator)
throws java.lang.Exception
- Throws:
java.lang.Exception
getAsynchronousThreadDumpAsString
public abstract java.lang.String getAsynchronousThreadDumpAsString(java.util.Iterator<DecisionTask> decisionTaskIterator)
throws java.lang.Exception
- Throws:
java.lang.Exception
loadWorkflowThroughReplay
public abstract java.lang.Object loadWorkflowThroughReplay(java.util.Iterator<DecisionTask> decisionTaskIterator)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.