Did this page help you?

   Yes   No   Tell us about it...

com.amazonaws.services.simpleworkflow.flow.worker
Class DecisionTaskHandler

java.lang.Object
  extended by 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

Constructor Summary
DecisionTaskHandler()
           
 
Method Summary
abstract  List<AsyncTaskInfo> getAsynchronousThreadDump(Iterator<DecisionTask> decisionTaskIterator)
           
abstract  String getAsynchronousThreadDumpAsString(Iterator<DecisionTask> decisionTaskIterator)
           
abstract  RespondDecisionTaskCompletedRequest handleDecisionTask(Iterator<DecisionTask> decisionTaskIterator)
          The implementation should be called when a polling SWF Decider receives a new WorkflowTask.
abstract  Object loadWorkflowThroughReplay(Iterator<DecisionTask> decisionTaskIterator)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecisionTaskHandler

public DecisionTaskHandler()
Method Detail

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.