Merge "update the credentials in subscribe call"
authorvarun gudisena <varuneshwar.gudisena@att.com>
Tue, 5 Feb 2019 15:35:58 +0000 (15:35 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 5 Feb 2019 15:35:58 +0000 (15:35 +0000)
1  2 
src/main/java/org/onap/dmaap/mr/dmaapMMAgent/MirrorMakerAgent.java

   *******************************************************************************/
  package org.onap.dmaap.mr.dmaapMMAgent;
  
 -import java.io.BufferedReader;
 -import java.io.DataOutputStream;
  import java.io.File;
  import java.io.FileInputStream;
  import java.io.FileOutputStream;
  import java.io.IOException;
  import java.io.InputStream;
 -import java.io.InputStreamReader;
  import java.io.OutputStream;
 -import java.net.HttpURLConnection;
 -import java.net.URL;
  import java.util.ArrayList;
  import java.util.Properties;
 -import org.json.JSONObject;
 +
  import org.apache.log4j.Logger;
  import org.jasypt.util.text.BasicTextEncryptor;
 -
 +import org.json.JSONObject;
  import org.onap.dmaap.mr.dmaapMMAgent.dao.CreateMirrorMaker;
  import org.onap.dmaap.mr.dmaapMMAgent.dao.DeleteMirrorMaker;
  import org.onap.dmaap.mr.dmaapMMAgent.dao.ListMirrorMaker;
@@@ -40,10 -45,13 +40,10 @@@ import org.onap.dmaap.mr.dmaapMMAgent.d
  import org.onap.dmaap.mr.dmaapMMAgent.dao.UpdateMirrorMaker;
  import org.onap.dmaap.mr.dmaapMMAgent.dao.UpdateWhiteList;
  import org.onap.dmaap.mr.dmaapMMAgent.utils.MirrorMakerProcessHandler;
 +
  import com.google.gson.Gson;
 -import com.google.gson.JsonArray;
  import com.google.gson.internal.LinkedTreeMap;
  
 -import com.sun.org.apache.xerces.internal.impl.dtd.models.CMAny;
 -import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
 -
  public class MirrorMakerAgent {
        static final Logger logger = Logger.getLogger(MirrorMakerAgent.class);
        Properties mirrorMakerProperties = new Properties();
                        return false;
                }
                logger.info("Published to Topic :" + this.topicname + " Successfully");
-               response = topicUtil.subscribeTopic(topicURL, topicname, "1", response, response);
+               response = topicUtil.subscribeTopic(topicURL, topicname, "1", mechid, password);
                if (response != null && response.startsWith("ERROR:")) {
                        logger.error("Problem subscribing to topic, please verify the config " + this.topicname + " MR URL is:"
                                        + this.topicURL + " Error is:  " + response);