- public static final String BACKUPFILE = "topicBackup.txt";
- private static Logger logger = FlexLogger.getLogger(GetDictionaryService.class.getName());
- private static ConcurrentHashMap<String, Date> topicQueue = new ConcurrentHashMap<>();
- private static int interval = 15000;
- private static Thread backUpthread = null;
- private static Object resourceLock = new Object();
- private static List<String> dmaapList = null;
- private static String dmaapServers = null;
- private static String aafLogin = null;
- private static String aafPassword = null;
-
- private String notificationResponse = null;
- private HttpStatus status = HttpStatus.BAD_REQUEST;
-
- /**
- * NotificationService Constructor.
- *
- * @param notificationTopic Topic Name in String format.
- * @param requestID Request ID in String format.
- * @param serviceType Needs to be NotificationServiceType based enumeration value.
- */
- public NotificationService(String notificationTopic, String requestID, NotificationServiceType serviceType) {
- init();
- if(dmaapServers==null || aafLogin==null || aafPassword==null){
- notificationResponse = XACMLErrorConstants.ERROR_DATA_ISSUE + "DMaaP properties are missing from the property file";
- return;
- }
- UUID requestUUID = null;
- if (requestID != null && !requestID.isEmpty()) {
- try {
- requestUUID = UUID.fromString(requestID);
- } catch (IllegalArgumentException e) {
- requestUUID = UUID.randomUUID();
- logger.info("Generated Random UUID: " + requestUUID.toString(), e);
- }
- }else{
- requestUUID = UUID.randomUUID();
- logger.info("Generated Random UUID: " + requestUUID.toString());
- }
- try{
+ public static final String BACKUPFILE = "topicBackup.txt";
+ private static Logger logger = FlexLogger.getLogger(GetDictionaryService.class.getName());
+ private static ConcurrentHashMap<String, Date> topicQueue = new ConcurrentHashMap<>();
+ private static int interval = 15000;
+ private static Thread backUpthread = null;
+ private static Object resourceLock = new Object();
+ private static List<String> dmaapList = null;
+ private static String dmaapServers = null;
+ private static String aafLogin = null;
+ private static String aafPassword = null;
+
+ private String notificationResponse = null;
+ private HttpStatus status = HttpStatus.BAD_REQUEST;
+
+ /**
+ * NotificationService Constructor.
+ *
+ * @param notificationTopic Topic Name in String format.
+ * @param requestID Request ID in String format.
+ * @param serviceType Needs to be NotificationServiceType based enumeration value.
+ */
+ public NotificationService(
+ String notificationTopic, String requestID, NotificationServiceType serviceType) {
+ init();
+ if (dmaapServers == null || aafLogin == null || aafPassword == null) {
+ notificationResponse =
+ XACMLErrorConstants.ERROR_DATA_ISSUE
+ + "DMaaP properties are missing from the property file";
+ return;
+ }
+ UUID requestUUID = null;
+ if (requestID != null && !requestID.isEmpty()) {
+ try {
+ requestUUID = UUID.fromString(requestID);
+ } catch (IllegalArgumentException e) {
+ requestUUID = UUID.randomUUID();
+ logger.info("Generated Random UUID: " + requestUUID.toString(), e);
+ }
+ } else {
+ requestUUID = UUID.randomUUID();
+ logger.info("Generated Random UUID: " + requestUUID.toString());
+ }
+ try {