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

项目:aws-swf-build-tools    文件:WorkflowTypeVisitor.java   
@Override
public Void visitExecutable(ExecutableElement method, ProcessingEnvironment env) {

    if (method.getAnnotation(Execute.class) != null) {
        String workflowName = ProcessorUtils.computeWorkflowName(
                workflowDefinition.getInterfaceName(), method);
        String workflowVersion = ProcessorUtils.computeWorkflowVersion(method);

        ExecuteMethod executeMethod = new ExecuteMethod(workflowName, workflowVersion);
        setMethodInfo(method, executeMethod, workflowDefinition.getPackageName());

        executeMethod.setAnnotationsToCopy(ProcessorUtils.getAnnotationsText(env, method, annotationsToExcludeFromCopying));

        workflowDefinition.setExecuteMethod(executeMethod);
    } 
    else if (method.getAnnotation(Signal.class) != null) {
        String signalName = ProcessorUtils.computeSignalName(method);

        SignalMethod signalMethod = new SignalMethod(signalName);
        setMethodInfo(method, signalMethod, workflowDefinition.getPackageName());

        workflowDefinition.getSignals().add(signalMethod);
    }
    else if (method.getAnnotation(GetState.class) != null) {
        GetStateMethod getStateMethod = new GetStateMethod();
        setMethodInfo(method, getStateMethod, workflowDefinition.getPackageName());

        workflowDefinition.setGetStateMethod(getStateMethod);
    }

    return super.visitExecutable(method, env);
}
项目:aws-flow-maven-eclipse-samples    文件:CronWithRetryWorkflow.java   
@GetState
String getInvocationHistory();
项目:aws-flow-maven-eclipse-samples    文件:FileProcessingWorkflow.java   
@GetState
public String getState();
项目:swf-starter    文件:FileProcessingWorkflow.java   
/**
 * Get the current state of the workflow. This is reported to the SWF console and
 * through SWF APIs.
 *
 * When the decider is done processing a decision task, it fetches the latest state
 * using the @GetState annotation.
 *
 * @return current state of the workflow
 */
@GetState
String getState();