com.amazonaws.services.simpleworkflow.flow.generic
Class ActivityImplementationBase
java.lang.Object
com.amazonaws.services.simpleworkflow.flow.generic.ActivityImplementation
com.amazonaws.services.simpleworkflow.flow.generic.ActivityImplementationBase
public abstract class ActivityImplementationBase
- extends ActivityImplementation
Extend this class to implement an activity. There are two types of activity
implementation: synchronous and asynchronous. Synchronous ties thread that
calls #execute(Map, ActivityExecutionContext)
method.
- See Also:
ActivityWorker
ActivityImplementationBase
public ActivityImplementationBase()
execute
public String execute(ActivityExecutionContext context)
throws ActivityFailureException,
CancellationException
- Description copied from class:
ActivityImplementation
- Execute external activity or initiate its execution if
#isManualActivityCompletion()
is true
.
- Specified by:
execute
in class ActivityImplementation
- Returns:
- result of activity execution if
#isManualActivityCompletion()
is set
to false. Use
ActivityWorker#respondActivityTaskCompleted(String, Map)
to return result in asynchronous case.
- Throws:
ActivityFailureException
CancellationException
- See Also:
ActivityImplementation.execute(ActivityExecutionContext)
getExecutionOptions
public ActivityTypeExecutionOptions getExecutionOptions()
- Specified by:
getExecutionOptions
in class ActivityImplementation
getRegistrationOptions
public ActivityTypeRegistrationOptions getRegistrationOptions()
- By default do not register
- Specified by:
getRegistrationOptions
in class ActivityImplementation
- Returns:
- null if activity registration is not required on the worker
startup
Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.