- String url = "http://" + urlList.getFirst() + ":3904/topics/" + PortalApiProperties.getProperty(PortalApiConstants.ECOMP_PORTAL_INBOX_NAME);
- if (!url.isEmpty()) {
- try {
- URL siteURL = new URL(url);
- HttpURLConnection connection = (HttpURLConnection) siteURL.openConnection();
- connection.setRequestMethod("GET");
- connection.connect();
-
- int code = connection.getResponseCode();
- if (code == 200) {
- available = true;
- }
- else {
- EPLogUtil.logEcompError(EPAppMessagesEnum.BeUebConnectionError, url);
- available = false;
- logger.warn(EELFLoggerDelegate.errorLogger, "Warning! UEB topic existence check failed, topic = " + url );
- logger.debug(EELFLoggerDelegate.debugLogger, "Warning! UEB topic existence check failed, topic = " + url );
- }
- }
- catch (Exception e) {
- available = false;
- String stackTrace = EcompPortalUtils.getStackTrace(e);
- logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing the UEB Healthcheck. Details: " + stackTrace);
- }
- }
+ String url = "http://" + urlList.getFirst() + ":3904/topics/"
+ + PortalApiProperties.getProperty(PortalApiConstants.ECOMP_PORTAL_INBOX_NAME);
+ if (!url.isEmpty()) {
+ try {
+ URL siteURL = new URL(url);
+ HttpURLConnection connection = (HttpURLConnection) siteURL.openConnection();
+ connection.setRequestMethod("GET");
+ connection.connect();
+
+ int code = connection.getResponseCode();
+ if (code == 200) {
+ available = true;
+ } else {
+ EPLogUtil.logEcompError(EPAppMessagesEnum.BeUebConnectionError, url);
+ available = false;
+ logger.warn(EELFLoggerDelegate.errorLogger,
+ "Warning! UEB topic existence check failed, topic = " + url);
+ logger.debug(EELFLoggerDelegate.debugLogger,
+ "Warning! UEB topic existence check failed, topic = " + url);
+ }
+ } catch (Exception e) {
+ available = false;
+ logger.error(EELFLoggerDelegate.errorLogger, "checkAvailability failed", e);
+ }
+ }