aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@bell.ca>2021-04-28 11:51:23 +0100
committerAjith Sreekumar <ajith.sreekumar@bell.ca>2021-05-07 14:29:12 +0000
commitac08e63b69998f51cafc8b2b2b4a475dbc7d9dd3 (patch)
treea610dab5e39da028360a91047bda771377cdbe4a /plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient
parent65a74af54d786c9217e4a8993e025e1748892bd8 (diff)
Changes to retain executionProperties per event flow for better context handling
Change-Id: I11668e9222dd9c61cc3096fa5c754c8702a781bf Issue-ID: POLICY-3227 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca> (cherry picked from commit 7bcbd221e350e45db5be0c4f1ceb2e4e1a418f63)
Diffstat (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient')
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConsumer.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConsumer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConsumer.java
index 452ecf8e5..fc7c11e9e 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConsumer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConsumer.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2021 Bell Canada. 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.
@@ -50,9 +51,6 @@ public class ApexRestClientConsumer extends ApexPluginsEventConsumer {
// The amount of time to wait in milliseconds between checks that the consumer thread has stopped
private static final long REST_CLIENT_WAIT_SLEEP_TIME = 50;
- // The Key for property
- private static final String HTTP_CODE_STATUS = "HTTP_CODE_STATUS";
-
// The REST parameters read from the parameter service
private RestClientCarrierTechnologyParameters restConsumerProperties;
@@ -171,12 +169,8 @@ public class ApexRestClientConsumer extends ApexPluginsEventConsumer {
throw new ApexEventRuntimeException(errorMessage);
}
- // build a key and value property in excutionProperties
- Properties executionProperties = new Properties();
- executionProperties.put(HTTP_CODE_STATUS, response.getStatus());
-
// Send the event into Apex
- eventReceiver.receiveEvent(executionProperties, eventJsonString);
+ eventReceiver.receiveEvent(new Properties(), eventJsonString);
} catch (final Exception e) {
LOGGER.warn("error receiving events on thread {}", consumerThread.getName(), e);
}