Java 类com.amazonaws.services.simpleworkflow.flow.ActivityExecutionContextProvider 实例源码

项目:aws-flow-maven-eclipse-samples    文件:CommonRecipeActivitiesImpl.java   
@Override
public void delayActivity(long time) {
    calls.add("delayActivity");
    ActivityExecutionContextProvider provider = new ActivityExecutionContextProviderImpl();
    ActivityExecutionContext context = provider.getActivityExecutionContext();
    try {
        while (true) {
            Thread.sleep(time * 1000);
            context.recordActivityHeartbeat(null);
        }
    }
    catch (InterruptedException e) {

    }

}
项目:aws-flow-maven-eclipse-samples    文件:CronExampleActivitiesImpl.java   
/**
 * Useful for unit testing activities.
 */
public CronExampleActivitiesImpl(ActivityExecutionContextProvider contextProvider) {
    this.contextProvider = contextProvider;
}
项目:aws-flow-maven-eclipse-samples    文件:CronExampleActivitiesImpl.java   
/**
 * Useful for unit testing activities.
 */
public CronExampleActivitiesImpl(ActivityExecutionContextProvider contextProvider) {
    this.contextProvider = contextProvider;
}
项目:aws-flow-maven-eclipse-samples    文件:PeriodicWorkflowActivitiesImpl.java   
/**
 * For unit testing or IoC
 */
public PeriodicWorkflowActivitiesImpl(ActivityExecutionContextProvider contextProvider) {
    this.contextProvider = contextProvider;
}
项目:aws-flow-maven-eclipse-samples    文件:ErrorReportingActivitiesImpl.java   
/**
 * For unit testing or IoC
 */
public ErrorReportingActivitiesImpl(ActivityExecutionContextProvider contextProvider) {
    this.contextProvider = contextProvider;
}