forked from aws/aws-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDynamicClient.java
More file actions
104 lines (89 loc) · 4.08 KB
/
DynamicClient.java
File metadata and controls
104 lines (89 loc) · 4.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*
* Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.simpleworkflow.flow;
import java.util.Map;
import com.amazonaws.services.simpleworkflow.flow.core.Promise;
import com.amazonaws.services.simpleworkflow.flow.generic.ContinueAsNewWorkflowExecutionParameters;
import com.amazonaws.services.simpleworkflow.flow.generic.ExecuteActivityParameters;
import com.amazonaws.services.simpleworkflow.flow.generic.SignalExternalWorkflowParameters;
import com.amazonaws.services.simpleworkflow.flow.generic.StartChildWorkflowExecutionParameters;
/**
*/
public interface DynamicClient {
/**
* Used to dynamically schedule an activity using its name
*
* @param activity
* name of activity to schedule
* @param input
* a Value containing a map of all input parameters to that activity
* @return
* a Value which contains a Map of results returned by the activity
*/
public Promise<Map<String, Object>> scheduleActivityTask(final String activity, final String version,
final Promise<Object[]> input);
/**
* Used to dynamically schedule an activity for execution
*
* @param activity
* Name of activity
* @param input
* A map of all input parameters to that activity
* @return
* A Value which contains a Map of results returned by the activity
*/
public abstract Promise<Map<String, Object>> scheduleActivityTask(String activity, String version, Object[] input);
/**
* Used to dynamically schedule an activity for execution
*
* @param parameters
* An object which encapsulates all the information required to schedule an activity
* for execution
* @return
* An object which can be used to cancel the activity or retrieve the Value
* containing the result for the activity
*/
public abstract Promise<String> scheduleActivityTask(ExecuteActivityParameters parameters);
/**
* Used to dynamically schedule an activity for execution
*
* @param activity
* Name of activity
* @param input
* A map of all input parameters to that activity
* @param converter
* Data converter to use for serialization of input parameters and deserialization of
* output result
* @return
* A Value which contains a Map of results returned by the activity
*/
public abstract Promise<Map<String, Object>> scheduleActivityTask(String activity, String version,
Object[] input, DataConverter converter);
public abstract Promise<String> startChildWorkflow(StartChildWorkflowExecutionParameters parameters);
public abstract Promise<Map<String, Object>> startChildWorkflow(String workflow, String version, Object[] input);
public abstract Promise<Map<String, Object>> startChildWorkflow(String workflow, String version,
Object[] input, DataConverter converter);
public abstract Promise<Map<String, Object>> startChildWorkflow(final String workflow, final String version,
final Promise<Object[]> input);
public abstract Promise<Void> signalWorkflowExecution(SignalExternalWorkflowParameters parameters);
/**
* Start a new generation of the workflow instance.
*
* @param input
* Map containing input parameters to the workflow
*/
public abstract void continueAsNewOnCompletion(Object[] input);
public abstract void continueAsNewOnCompletion(ContinueAsNewWorkflowExecutionParameters parameters);
}