com.amazonaws.services.simpleworkflow.flow
Class ActivityExecutionContext
java.lang.Object
com.amazonaws.services.simpleworkflow.flow.ActivityExecutionContext
public abstract class ActivityExecutionContext
- extends Object
Context object passed to an activity implementation.
- See Also:
ActivityImplementation
ActivityExecutionContext
public ActivityExecutionContext()
getTaskToken
public abstract String getTaskToken()
- Returns:
- task token that is required to report task completion when
ManualActivityCompletion
is used.
getWorkflowExecution
public abstract WorkflowExecution getWorkflowExecution()
- Returns:
- workfow execution that requested the activity execution
getTask
public abstract ActivityTask getTask()
- Returns:
- task that caused activity execution
recordActivityHeartbeat
public abstract void recordActivityHeartbeat(String details)
throws AmazonServiceException,
AmazonClientException,
CancellationException
- Use to notify Simple Workflow that activity execution is alive.
- Parameters:
details
- In case of activity timeout details are returned as a field of
the exception thrown.
- Throws:
AmazonClientException
- If any internal errors are encountered inside the client
while attempting to make the request or handle the response.
For example if a network connection is not available.
AmazonServiceException
- If an error response is returned by AmazonSimpleWorkflow
indicating either a problem with the data in the request.
Internal service errors are swallowed and not propagated to
the caller.
CancellationException
- Indicates that activity cancellation was requested by the
workflow.Should be rethrown from activity implementation to
indicate successful cancellation.
getService
public abstract AmazonSimpleWorkflow getService()
- Returns:
- an instance of the Simple Workflow Java client that is the same
used by the invoked activity worker.
getDomain
public String getDomain()
Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.