summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/dcae/commonFunction/CambriaPublisherFactory.java
diff options
context:
space:
mode:
authorPawelSzalapski <pawel.szalapski@nokia.com>2018-06-21 12:12:30 +0200
committerPawelSzalapski <pawel.szalapski@nokia.com>2018-06-24 14:18:02 +0200
commit943a47187dbb1393d720b2fdf0019d48270edb4d (patch)
treefef76ed7b3034597853ab9735f5052cab2f0d6d5 /src/main/java/org/onap/dcae/commonFunction/CambriaPublisherFactory.java
parentb4d5236a7164b166d49cf8c0a5c15bb848e04cd6 (diff)
Remove dead code from VESCollector
Many things there are unused or have inproper modifiers, spelling etc. I run static analysis tool (Intellij code inspect) and clear those things up. It will be easier to maintain now. No actual behavior changes were done. Issue-ID: DCAEGEN2-526 Signed-off-by: PawelSzalapski <pawel.szalapski@nokia.com> Change-Id: I1a4ad0c896bd32165cba654344ffc5245648c615
Diffstat (limited to 'src/main/java/org/onap/dcae/commonFunction/CambriaPublisherFactory.java')
-rw-r--r--src/main/java/org/onap/dcae/commonFunction/CambriaPublisherFactory.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/main/java/org/onap/dcae/commonFunction/CambriaPublisherFactory.java b/src/main/java/org/onap/dcae/commonFunction/CambriaPublisherFactory.java
index 41230a14..79109c04 100644
--- a/src/main/java/org/onap/dcae/commonFunction/CambriaPublisherFactory.java
+++ b/src/main/java/org/onap/dcae/commonFunction/CambriaPublisherFactory.java
@@ -30,38 +30,34 @@ import org.slf4j.LoggerFactory;
class CambriaPublisherFactory {
- private static Logger log = LoggerFactory.getLogger(CambriaPublisherFactory.class);
+ private final static Logger log = LoggerFactory.getLogger(CambriaPublisherFactory.class);
- public CambriaBatchingPublisher createCambriaPublisher(String streamId)
+ CambriaBatchingPublisher createCambriaPublisher(String streamId)
throws MalformedURLException, GeneralSecurityException {
String authpwd = null;
DmaapPropertyReader reader = DmaapPropertyReader.getInstance(CommonStartup.cambriaConfigFile);
- Map<String, String> dmaapProperties = reader.getDmaapProperties();
- String ueburl = dmaapProperties.get(streamId + ".cambria.url");
+ Map<String, String> dMaaPProperties = reader.getDmaapProperties();
+ String ueburl = dMaaPProperties.get(streamId + ".cambria.url");
if (ueburl == null) {
- ueburl = dmaapProperties.get(streamId + ".cambria.hosts");
+ ueburl = dMaaPProperties.get(streamId + ".cambria.hosts");
}
String topic = reader.getKeyValue(streamId + ".cambria.topic");
String authuser = reader.getKeyValue(streamId + ".basicAuthUsername");
if (authuser != null) {
- authpwd = dmaapProperties.get(streamId + ".basicAuthPassword");
+ authpwd = dMaaPProperties.get(streamId + ".basicAuthPassword");
}
if ((authuser != null) && (authpwd != null)) {
log.debug(String.format("URL:%sTOPIC:%sAuthUser:%sAuthpwd:%s", ueburl, topic, authuser, authpwd));
return new CambriaClientBuilders.PublisherBuilder().usingHosts(ueburl).onTopic(topic).usingHttps()
.authenticatedByHttp(authuser, authpwd).logSendFailuresAfter(5)
- // .logTo(log)
- // .limitBatch(100, 10)
.build();
} else {
log.debug(String.format("URL:%sTOPIC:%s", ueburl, topic));
return new CambriaClientBuilders.PublisherBuilder().usingHosts(ueburl).onTopic(topic)
- // .logTo(log)
.logSendFailuresAfter(5)
- // .limitBatch(100, 10)
.build();
}
}