diff options
Diffstat (limited to 'holmes-actions/src/main')
3 files changed, 16 insertions, 9 deletions
diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/config/MQConfig.java b/holmes-actions/src/main/java/org/onap/holmes/common/config/MQConfig.java index 2ade152..70ef0cb 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/config/MQConfig.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/config/MQConfig.java @@ -16,13 +16,20 @@ package org.onap.holmes.common.config;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
public class MQConfig {
- public String brokerIp;
+ private String brokerIp;
- public int brokerPort;
+ private int brokerPort;
- public String brokerUsername;
+ private String brokerUsername;
- public String brokerPassword;
+ private String brokerPassword;
}
diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/DmaapService.java b/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/DmaapService.java index 240f09b..c64bd59 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/DmaapService.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/DmaapService.java @@ -38,8 +38,8 @@ public class DmaapService { @Inject private AaiQuery aaiQuery; - public static ConcurrentHashMap<String, String> loopControlNames = new ConcurrentHashMap<>(); - public static ConcurrentHashMap<String, String> alarmUniqueRequestID = new ConcurrentHashMap<>(); + public static final ConcurrentHashMap<String, String> loopControlNames = new ConcurrentHashMap<>(); + public static final ConcurrentHashMap<String, String> alarmUniqueRequestID = new ConcurrentHashMap<>(); public void publishPolicyMsg(PolicyMsg policyMsg, String dmaapConfigKey) { try { diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/producer/MQProducer.java b/holmes-actions/src/main/java/org/onap/holmes/common/producer/MQProducer.java index fd91bbd..4bbffac 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/producer/MQProducer.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/producer/MQProducer.java @@ -48,9 +48,9 @@ public class MQProducer { public void init() {
String brokerURL =
- "tcp://" + mqConfigProvider.get().brokerIp + ":" + mqConfigProvider.get().brokerPort;
- connectionFactory = new ActiveMQConnectionFactory(mqConfigProvider.get().brokerUsername,
- mqConfigProvider.get().brokerPassword, brokerURL);
+ "tcp://" + mqConfigProvider.get().getBrokerIp() + ":" + mqConfigProvider.get().getBrokerPort();
+ connectionFactory = new ActiveMQConnectionFactory(mqConfigProvider.get().getBrokerUsername(),
+ mqConfigProvider.get().getBrokerPassword(), brokerURL);
}
public void sendAlarmMQTopicMsg(VesAlarm alarm) {
|