summaryrefslogtreecommitdiffstats
path: root/models-sim/policy-models-sim-pdp/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'models-sim/policy-models-sim-pdp/src/main')
-rw-r--r--models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorActivator.java11
-rw-r--r--models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorMain.java7
2 files changed, 6 insertions, 12 deletions
diff --git a/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorActivator.java b/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorActivator.java
index 735784ee6..2c3f8f79f 100644
--- a/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorActivator.java
+++ b/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorActivator.java
@@ -22,7 +22,6 @@
package org.onap.policy.models.sim.pdp;
import java.util.List;
-import java.util.Properties;
import java.util.Random;
import lombok.Getter;
import lombok.Setter;
@@ -77,13 +76,13 @@ public class PdpSimulatorActivator {
* Instantiate the activator for onappf PDP-A.
*
* @param pdpSimulatorParameterGroup the parameters for the onappf PDP-A service
- * @param topicProperties properties used to configure the topics
*/
- public PdpSimulatorActivator(final PdpSimulatorParameterGroup pdpSimulatorParameterGroup,
- final Properties topicProperties) {
+ public PdpSimulatorActivator(final PdpSimulatorParameterGroup pdpSimulatorParameterGroup) {
- topicSinks = TopicEndpointManager.getManager().addTopicSinks(topicProperties);
- topicSources = TopicEndpointManager.getManager().addTopicSources(topicProperties);
+ topicSinks = TopicEndpointManager.getManager()
+ .addTopicSinks(pdpSimulatorParameterGroup.getTopicParameterGroup().getTopicSinks());
+ topicSources = TopicEndpointManager.getManager()
+ .addTopicSources(pdpSimulatorParameterGroup.getTopicParameterGroup().getTopicSources());
final int random = RANDOM.nextInt();
final String instanceId = "pdp_" + random;
diff --git a/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorMain.java b/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorMain.java
index ee974c579..e367cca41 100644
--- a/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorMain.java
+++ b/models-sim/policy-models-sim-pdp/src/main/java/org/onap/policy/models/sim/pdp/PdpSimulatorMain.java
@@ -22,8 +22,6 @@
package org.onap.policy.models.sim.pdp;
import java.util.Arrays;
-import java.util.Properties;
-import org.onap.policy.common.endpoints.utils.ParameterUtils;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.sim.pdp.exception.PdpSimulatorException;
import org.onap.policy.models.sim.pdp.parameters.PdpSimulatorParameterGroup;
@@ -79,11 +77,8 @@ public class PdpSimulatorMain {
return;
}
- // Read the properties
- Properties topicProperties = ParameterUtils.getTopicProperties(parameterGroup.getTopicParameterGroup());
-
// create the activator
- activator = new PdpSimulatorActivator(parameterGroup, topicProperties);
+ activator = new PdpSimulatorActivator(parameterGroup);
Registry.register(PdpSimulatorConstants.REG_PDP_SIMULATOR_ACTIVATOR, activator);
// Start the activator
try {