diff options
Diffstat (limited to 'services/services-onappf/src/main')
2 files changed, 9 insertions, 12 deletions
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java index 968c54d3d..affbf39e9 100644 --- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java +++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.services.onappf; import java.util.List; -import java.util.Properties; import lombok.Getter; import lombok.Setter; import org.onap.policy.apex.services.onappf.comm.PdpStateChangeListener; @@ -80,13 +79,14 @@ public class ApexStarterActivator { * Instantiate the activator for onappf PDP-A. * * @param apexStarterParameterGroup the parameters for the onappf PDP-A service - * @param topicProperties properties used to configure the topics */ - public ApexStarterActivator(final ApexStarterParameterGroup apexStarterParameterGroup, - final Properties topicProperties) { + public ApexStarterActivator(final ApexStarterParameterGroup apexStarterParameterGroup) { - topicSinks = TopicEndpointManager.getManager().addTopicSinks(topicProperties); - topicSources = TopicEndpointManager.getManager().addTopicSources(topicProperties); + topicSinks = TopicEndpointManager.getManager() + .addTopicSinks(apexStarterParameterGroup.getTopicParameterGroup().getTopicSinks()); + + topicSources = TopicEndpointManager.getManager() + .addTopicSources(apexStarterParameterGroup.getTopicParameterGroup().getTopicSources()); // TODO: instanceId currently set as a random string, could be fetched from actual deployment final int random = (int) (Math.random() * 100); diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterMain.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterMain.java index 15d9a8395..2a3031a4a 100644 --- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterMain.java +++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterMain.java @@ -1,6 +1,8 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019 AT&T Intellectual Property. 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. @@ -21,11 +23,9 @@ package org.onap.policy.apex.services.onappf; import java.util.Arrays; -import java.util.Properties; import org.onap.policy.apex.services.onappf.exception.ApexStarterException; import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterGroup; import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterHandler; -import org.onap.policy.common.endpoints.utils.ParameterUtils; import org.onap.policy.common.utils.services.Registry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -76,11 +76,8 @@ public class ApexStarterMain { return; } - // Read the properties - Properties topicProperties = ParameterUtils.getTopicProperties(parameterGroup.getTopicParameterGroup()); - // create the activator - activator = new ApexStarterActivator(parameterGroup, topicProperties); + activator = new ApexStarterActivator(parameterGroup); Registry.register(ApexStarterConstants.REG_APEX_STARTER_ACTIVATOR, activator); // Start the activator try { |