+ /**
+ * Reset the retry timer for a subscription.
+ */
+ static void resetQueue(String subid, String ip) {
+ delivery.resetQueue(nodeConfigManager.getSpoolDir(subid, ip));
+ }
+
+ /**
+ * Start the data router.
+ *
+ * <p>The location of the node configuration file can be set using the org.onap.dmaap.datarouter.node.properties
+ * system property. By default, it is "/opt/app/datartr/etc/node.properties".
+ */
+ public static void main(String[] args) throws Exception {
+ nodeMainLogger.info("NODE0001 Data Router Node Starting");
+ IsFrom.setDNSCache();
+ nodeConfigManager = NodeConfigManager.getInstance();
+ nodeMainLogger.info("NODE0002 I am " + nodeConfigManager.getMyName());
+ (new WaitForConfig(nodeConfigManager)).waitForConfig();
+ delivery = new Delivery(nodeConfigManager);
+ new LogManager(nodeConfigManager);
+
+ Server server = new Server();
+
+ // HTTP configuration
+ HttpConfiguration httpConfiguration = new HttpConfiguration();
+ httpConfiguration.setRequestHeaderSize(2048);
+
+ // HTTP connector
+ try (ServerConnector httpServerConnector = new ServerConnector(server,
+ new HttpConnectionFactory(httpConfiguration))) {
+ httpServerConnector.setPort(nodeConfigManager.getHttpPort());
+ httpServerConnector.setIdleTimeout(2000);
+
+ // HTTPS configuration
+ SslContextFactory sslContextFactory = new SslContextFactory();
+ sslContextFactory.setKeyStoreType(nodeConfigManager.getKSType());
+ sslContextFactory.setKeyStorePath(nodeConfigManager.getKSFile());
+ sslContextFactory.setKeyStorePassword(nodeConfigManager.getKSPass());
+ sslContextFactory.setKeyManagerPassword(nodeConfigManager.getKPass());
+
+ //SP-6: Fixes for SDV scan to exclude/remove DES/3DES
+ // ciphers are taken care by upgrading jdk in descriptor.xml
+ sslContextFactory.setExcludeCipherSuites(
+ "SSL_RSA_WITH_DES_CBC_SHA",
+ "SSL_DHE_RSA_WITH_DES_CBC_SHA",
+ "SSL_DHE_DSS_WITH_DES_CBC_SHA",
+ "SSL_RSA_EXPORT_WITH_RC4_40_MD5",
+ "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
+ "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
+ "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA"
+ );
+
+ sslContextFactory.addExcludeProtocols("SSLv3");
+ sslContextFactory.setIncludeProtocols(nodeConfigManager.getEnabledprotocols());
+ nodeMainLogger.info("NODE00004 Unsupported protocols node server:-"
+ + String.join(",", sslContextFactory.getExcludeProtocols()));
+ nodeMainLogger.info("NODE00004 Supported protocols node server:-"
+ + String.join(",", sslContextFactory.getIncludeProtocols()));
+ nodeMainLogger.info("NODE00004 Unsupported ciphers node server:-"
+ + String.join(",", sslContextFactory.getExcludeCipherSuites()));
+
+ HttpConfiguration httpsConfiguration = new HttpConfiguration(httpConfiguration);
+ httpsConfiguration.setRequestHeaderSize(8192);