\r
package org.onap.dmaap.datarouter.provisioning.utils;\r
\r
+import com.att.eelf.configuration.EELFLogger;\r
+import com.att.eelf.configuration.EELFManager;\r
import java.net.InetAddress;\r
import java.net.UnknownHostException;\r
import java.util.Arrays;\r
* @version $Id: URLUtilities.java,v 1.2 2014/03/12 19:45:41 eby Exp $\r
*/\r
public class URLUtilities {\r
-\r
+ private static final EELFLogger utilsLogger = EELFManager.getInstance().getLogger("UtilsLog");\r
/**\r
* Generate the URL used to access a feed.\r
*\r
* @return the URL\r
*/\r
public static String generateFeedURL(int feedid) {\r
- return "https://" + BaseServlet.provName + "/feed/" + feedid;\r
+ return "https://" + BaseServlet.getProvName() + "/feed/" + feedid;\r
}\r
\r
/**\r
* @return the URL\r
*/\r
public static String generatePublishURL(int feedid) {\r
- return "https://" + BaseServlet.provName + "/publish/" + feedid;\r
+ return "https://" + BaseServlet.getProvName() + "/publish/" + feedid;\r
}\r
\r
/**\r
* @return the URL\r
*/\r
public static String generateSubscribeURL(int feedid) {\r
- return "https://" + BaseServlet.provName + "/subscribe/" + feedid;\r
+ return "https://" + BaseServlet.getProvName() + "/subscribe/" + feedid;\r
}\r
\r
/**\r
* @return the URL\r
*/\r
public static String generateFeedLogURL(int feedid) {\r
- return "https://" + BaseServlet.provName + "/feedlog/" + feedid;\r
+ return "https://" + BaseServlet.getProvName() + "/feedlog/" + feedid;\r
}\r
\r
/**\r
* @return the URL\r
*/\r
public static String generateSubscriptionURL(int subid) {\r
- return "https://" + BaseServlet.provName + "/subs/" + subid;\r
+ return "https://" + BaseServlet.getProvName() + "/subs/" + subid;\r
}\r
\r
/**\r
* @return the URL\r
*/\r
public static String generateSubLogURL(int subid) {\r
- return "https://" + BaseServlet.provName + "/sublog/" + subid;\r
+ return "https://" + BaseServlet.getProvName() + "/sublog/" + subid;\r
}\r
\r
/**\r
public static String generatePeerLogsURL() {\r
//Fixes for Itrack ticket - DATARTR-4#Fixing if only one Prov is configured, not to give exception to fill logs.\r
String peerPodUrl = getPeerPodName();\r
- if (peerPodUrl.equals("") || peerPodUrl==null) {\r
+ if (peerPodUrl == null || peerPodUrl.equals("")) {\r
return "";\r
}\r
\r
this_pod = InetAddress.getLocalHost().getHostName();\r
System.out.println("this_pod: " + this_pod);\r
} catch (UnknownHostException e) {\r
+ utilsLogger.trace("UnkownHostException: " + e.getMessage(), e);\r
this_pod = "";\r
}\r
System.out.println("ALL PODS: " + Arrays.asList(BaseServlet.getPods()));\r