summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Young <ry303t@att.com>2018-05-29 11:26:26 -0400
committerRyan Young <ry303t@att.com>2018-05-29 11:28:47 -0400
commit61f4c8ce5e093db0b63d4030cbd3e6df499854a1 (patch)
tree98cfbce8293b3751e08e8d94ef2f2a5817365d96
parent2f76aaa31d09cd691636650e13f36ecdb17e1df4 (diff)
Client to use controller type for DMaaP partition
Update client library to use the controller type to set the DMaaP cambria.partition Change-Id: I7e3206309d99ba599d7d6785e63a76ec7c948896 Signed-off-by: Ryan Young <ry303t@att.com> Issue-ID: APPC-934
-rw-r--r--appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/AsyncProtocolImpl.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/AsyncProtocolImpl.java b/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/AsyncProtocolImpl.java
index 8567d993a..9f39b9f57 100644
--- a/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/AsyncProtocolImpl.java
+++ b/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/AsyncProtocolImpl.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
@@ -18,7 +18,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
@@ -72,6 +71,7 @@ class AsyncProtocolImpl implements AsyncProtocol {
private static final EELFLogger LOG = EELFManager.getInstance().getLogger(AsyncProtocolImpl.class);
+ private String controllerType = null;
AsyncProtocolImpl() {
@@ -87,8 +87,10 @@ class AsyncProtocolImpl implements AsyncProtocol {
throw new ProtocolException("Callback param should not be null!");
}
this.callback = callback;
-
- try {
+
+ controllerType = props.getProperty(UEBPropertiesKeys.CONTROLLER_TYPE);
+
+ try {
messageService.init(props);
//get message bus listener thread
//start the thread after initializing services
@@ -100,7 +102,11 @@ class AsyncProtocolImpl implements AsyncProtocol {
@Override
public void sendRequest(String payload, MessageContext context) throws ProtocolException {
-
+ if (controllerType != null && controllerType.length()!= 0 && (!controllerType.equals("APPC")))
+ {
+ context.setPartiton(controllerType);
+ }
+
//get message to be sent to appc from payload and context
String message = messageWriter.write(payload, context);
try {