* ============LICENSE_START=======================================================
* ONAP-PDP-REST
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
dmaapServers = XACMLProperties.getProperty(XACMLRestProperties.PROP_NOTIFICATION_SERVERS);
aafLogin = XACMLProperties.getProperty("DMAAP_AAF_LOGIN");
aafPassword = XACMLProperties.getProperty("DMAAP_AAF_PASSWORD");
- interval = Integer.parseInt(XACMLProperties.getProperty(XACMLRestProperties.PROP_NOTIFICATION_DELAY, Integer.toString(interval)));
+ interval = Integer.parseInt(XACMLProperties.getProperty("CLIENT_INTERVAL", Integer.toString(interval)));
if(dmaapServers==null || aafLogin==null || aafPassword==null){
logger.error(XACMLErrorConstants.ERROR_DATA_ISSUE + "DMaaP properties are missing from the property file ");
return;
callThread();
}
}
+
+ public static void reloadProps(){
+ dmaapServers = null;
+ aafLogin = null;
+ aafPassword = null;
+ backUpthread = null;
+ }
private void run(String notificationTopic, NotificationServiceType serviceType) throws PolicyException{
// Check Validation
Date currentTime = new Date();
long timeDiff = 0;
timeDiff = currentTime.getTime()-map.getValue().getTime();
- if(timeDiff < (interval+1500)){
+ if(timeDiff > (interval+1500)){
removeTopic(map.getKey());
}
}
aafLogin,
aafPassword);
// Sending notification through DMaaP Message Router
+ logger.info("NotificationService: send DMaaP Message. ");
publisher.send( "MyPartitionKey", notification);
- logger.debug("Message Published on DMaaP :" + dmaapList.get(0) + "for Topic: " + topic);
+ logger.info("Message Published on DMaaP :" + dmaapList.get(0) + "for Topic: " + topic);
publisher.close();
}