aboutsummaryrefslogtreecommitdiffstats
path: root/appc-dispatcher/appc-command-executor/appc-command-executor-api
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-05-08 23:04:31 -0700
committerGary Wu <gary.i.wu@huawei.com>2017-05-16 12:13:01 -0700
commitccf361a446c19d1c67ed1adf4db191be67c3cf58 (patch)
treeba3cb105d5b37881b15b8c9db5f9289341c41675 /appc-dispatcher/appc-command-executor/appc-command-executor-api
parent753cb638fcb58f355f2c979e9e0a43cba2832984 (diff)
Refactor CommandTask classes to be immutable
Refactor CommandTask and its subclasses to be immutable. Also made CommandResponse immutable. Change-Id: I9ea1b57fdff677b163c0fe9ad5d48f24b781a08f Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'appc-dispatcher/appc-command-executor/appc-command-executor-api')
-rw-r--r--appc-dispatcher/appc-command-executor/appc-command-executor-api/src/main/java/org/openecomp/appc/executor/objects/CommandResponse.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/appc-dispatcher/appc-command-executor/appc-command-executor-api/src/main/java/org/openecomp/appc/executor/objects/CommandResponse.java b/appc-dispatcher/appc-command-executor/appc-command-executor-api/src/main/java/org/openecomp/appc/executor/objects/CommandResponse.java
index c973fcde1..8009d72d5 100644
--- a/appc-dispatcher/appc-command-executor/appc-command-executor-api/src/main/java/org/openecomp/appc/executor/objects/CommandResponse.java
+++ b/appc-dispatcher/appc-command-executor/appc-command-executor-api/src/main/java/org/openecomp/appc/executor/objects/CommandResponse.java
@@ -26,13 +26,14 @@ import org.openecomp.appc.domainmodel.lcm.RuntimeContext;
public class CommandResponse {
- private RuntimeContext runtimeContext;
+ private final RuntimeContext runtimeContext;
- public RuntimeContext getRuntimeContext() {
- return runtimeContext;
+ public CommandResponse(RuntimeContext runtimeContext) {
+ super();
+ this.runtimeContext = runtimeContext;
}
- public void setRuntimeContext(RuntimeContext runtimeContext) {
- this.runtimeContext = runtimeContext;
+ public RuntimeContext getRuntimeContext() {
+ return runtimeContext;
}
}