+ try {
+ readNearRtRicConfigFile();
+ } catch (IOException ex) {
+ log.error("Exception while reading nearRtRicConfigFile: {}", ex);
+ }
+ }
+
+ private void readNearRtRicConfigFile() throws IOException {
+ InputStream inputStream = NearRicUrlProvider.class.getClassLoader().getResourceAsStream(NEAR_RIC_LIST_FILE);
+ if (inputStream == null) {
+ log.error("The file {} not found in classpath", NEAR_RIC_LIST_FILE);
+ } else {
+ Properties properties = new Properties();
+ properties.load(inputStream);
+ Enumeration<?> keys = properties.propertyNames();
+ while (keys.hasMoreElements()) {
+ String key = (String) keys.nextElement();
+ nearRicMap.put(key, properties.getProperty(key));
+ }
+ inputStream.close();
+ }
+ }
+
+ /**
+ * Retrieve the list of Near-RICs
+ *
+ * @return the list of Near-RICs
+ */
+ public List<String> getNearRTRicIdsList () {
+ return new ArrayList<>(nearRicMap.keySet());