aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRam Koya <rk541m@att.com>2018-08-21 13:15:12 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-21 13:15:12 +0000
commit441eae1b3d617a5b78df37865874f166e3491f8d (patch)
treef77506ec893b191100d899212de05f63231accfb
parentb41f23ef65cc5adbd0a5e77f8e80e801e370c8d9 (diff)
parent7abb2a2bb8b6fb0ebba5187a79184e07a23941e6 (diff)
Merge "fixed Sonar issues"
-rw-r--r--datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java
index 07e10b2b..8aaa577c 100644
--- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeMain.java
@@ -39,7 +39,7 @@ public class NodeMain {
private NodeMain() {
}
- private static Logger logger = Logger.getLogger("org.onap.dmaap.datarouter.node.NodeMain");
+ private static Logger LOGGER = Logger.getLogger("org.onap.dmaap.datarouter.node.NodeMain");
private static class WaitForConfig implements Runnable {
@@ -56,15 +56,15 @@ public class NodeMain {
synchronized void waitForConfig() {
localNodeConfigManager.registerConfigTask(this);
while (!localNodeConfigManager.isConfigured()) {
- logger.info("NODE0003 Waiting for Node Configuration");
+ LOGGER.info("NODE0003 Waiting for Node Configuration");
try {
wait();
} catch (Exception e) {
- logger.debug("NodeMain: waitForConfig exception");
+ LOGGER.debug("NodeMain: waitForConfig exception. Exception Message:- " +e.getMessage());
}
}
localNodeConfigManager.deregisterConfigTask(this);
- logger.info("NODE0004 Node Configuration Data Received");
+ LOGGER.info("NODE0004 Node Configuration Data Received");
}
}
@@ -85,15 +85,13 @@ public class NodeMain {
* property. By default, it is "etc/node.properties".
*/
public static void main(String[] args) throws Exception {
- logger.info("NODE0001 Data Router Node Starting");
+ LOGGER.info("NODE0001 Data Router Node Starting");
IsFrom.setDNSCache();
nodeConfigManager = NodeConfigManager.getInstance();
- logger.info("NODE0002 I am " + nodeConfigManager.getMyName());
+ LOGGER.info("NODE0002 I am " + nodeConfigManager.getMyName());
(new WaitForConfig(nodeConfigManager)).waitForConfig();
delivery = new Delivery(nodeConfigManager);
- LogManager lm = new LogManager(nodeConfigManager);
Server server = new Server();
-
// HTTP configuration
HttpConfiguration httpConfiguration = new HttpConfiguration();
httpConfiguration.setIdleTimeout(2000);
@@ -113,7 +111,7 @@ public class NodeMain {
sslContextFactory.setKeyManagerPassword(nodeConfigManager.getKPass());
/* Skip SSLv3 Fixes */
sslContextFactory.addExcludeProtocols("SSLv3");
- logger.info("Excluded protocols node-" + Arrays.toString(sslContextFactory.getExcludeProtocols()));
+ LOGGER.info("Excluded protocols node-" + Arrays.toString(sslContextFactory.getExcludeProtocols()));
/* End of SSLv3 Fixes */
HttpConfiguration httpsConfiguration = new HttpConfiguration(httpConfiguration);
@@ -138,7 +136,7 @@ public class NodeMain {
ctxt.setContextPath("/");
server.setHandler(ctxt);
ctxt.addServlet(new ServletHolder(new NodeServlet()), "/*");
- logger.info("NODE0005 Data Router Node Activating Service");
+ LOGGER.info("NODE0005 Data Router Node Activating Service");
server.start();
server.join();
}