summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actorServiceProvider/src/main
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-02-18 12:25:37 -0500
committerJim Hahn <jrh3@att.com>2020-02-19 12:45:30 -0500
commitcbbc4a71ce71f22439b083107c65c22cc63bc9cc (patch)
tree5123d1b22ddd887d693b5007060cb3bdc7f0bad6 /models-interactions/model-actors/actorServiceProvider/src/main
parent4ccc26577b51545b4b4db6823c6d926bc0ffc5a4 (diff)
Add SO actor
Issue-ID: POLICY-2371 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I3faf0276e8039dc43a976d18ff8e704fdbec3d49
Diffstat (limited to 'models-interactions/model-actors/actorServiceProvider/src/main')
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/controlloop/ControlLoopEventContext.java2
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperator.java9
2 files changed, 10 insertions, 1 deletions
diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/controlloop/ControlLoopEventContext.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/controlloop/ControlLoopEventContext.java
index 3e02da611..8099ea7c2 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/controlloop/ControlLoopEventContext.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/controlloop/ControlLoopEventContext.java
@@ -137,7 +137,7 @@ public class ControlLoopEventContext implements Serializable {
// @formatter:off
CompletableFuture<OperationOutcome> oldFuture =
- retrievers.compute(name, (key, future) -> (future == null || future.isCancelled() ? null : future));
+ retrievers.computeIfPresent(name, (key, future) -> future.isCancelled() ? null : future);
// @formatter:on
if (oldFuture != null) {
diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperator.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperator.java
index add74aa42..b4a3318e7 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperator.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperator.java
@@ -95,6 +95,15 @@ public abstract class HttpOperator extends OperatorPartial {
throw new ParameterValidationRuntimeException("invalid parameters", result);
}
+ doConfigure(params);
+ }
+
+ /**
+ * Configures the operator using the specified parameters.
+ *
+ * @param params operator parameters
+ */
+ protected void doConfigure(HttpParams params) {
client = getClientFactory().get(params.getClientName());
path = params.getPath();
timeoutMs = TimeUnit.MILLISECONDS.convert(params.getTimeoutSec(), TimeUnit.SECONDS);