-
- private String provURL;
-
- private HttpURLConnection uc;
-
-
- private String topicMgrCred;
- private boolean useAAF;
- private String user;
- private String encPwd;
-
- public MrProvConnection() {
- String mechIdProperty = "aaf.TopicMgrUser";
- String pwdProperty = "aaf.TopicMgrPassword";
- DmaapConfig p = (DmaapConfig)DmaapConfig.getConfig();
- user = p.getProperty( mechIdProperty, "noMechId@domain.netset.com" );
- encPwd = p.getProperty( pwdProperty, "notSet" );
- useAAF= "true".equalsIgnoreCase(p.getProperty("UseAAF", "false"));
- topicMgrCred = getCred();
-
- }
-
- private String getCred( ) {
-
-
- String pwd = "";
- AafDecrypt decryptor = new AafDecrypt();
- pwd = decryptor.decrypt(encPwd);
- return user + ":" + pwd;
- }
-
-
- public boolean makeTopicConnection( MR_Cluster cluster ) {
- logger.info( "connect to cluster: " + cluster.getDcaeLocationName());
-
-
- provURL = cluster.getTopicProtocol() + "://" + cluster.getFqdn() + ":" + cluster.getTopicPort() + "/topics/create";
-
- if ( cluster.getTopicProtocol().equals( "https" ) ) {
- return makeSecureConnection( provURL );
- }
- return makeConnection( provURL );
- }
-
- private boolean makeSecureConnection( String pURL ) {
- logger.info( "makeConnection to " + pURL );
-
- try {
- URL u = new URL( pURL );
- uc = (HttpsURLConnection) u.openConnection();
- uc.setInstanceFollowRedirects(false);
- logger.info( "open connect to " + pURL );
- return(true);
- } catch( UnknownHostException uhe ){
- logger.error( "Caught UnknownHostException for " + pURL);
- return(false);
+
+ private String provURL;
+
+ private HttpURLConnection uc;
+
+
+ private String topicMgrCred;
+ private boolean useAAF;
+ private String user;
+ private String encPwd;
+
+ public MrProvConnection() {
+ String mechIdProperty = "aaf.TopicMgrUser";
+ String pwdProperty = "aaf.TopicMgrPassword";
+ DmaapConfig p = (DmaapConfig)DmaapConfig.getConfig();
+ user = p.getProperty( mechIdProperty, "noMechId@domain.netset.com" );
+ encPwd = p.getProperty( pwdProperty, "notSet" );
+ useAAF= "true".equalsIgnoreCase(p.getProperty("UseAAF", "false"));
+ topicMgrCred = getCred();
+
+ }
+
+ private String getCred( ) {
+
+
+ String pwd = "";
+ AafDecrypt decryptor = new AafDecrypt();
+ pwd = decryptor.decrypt(encPwd);
+ return user + ":" + pwd;
+ }
+
+
+ public boolean makeTopicConnection( MR_Cluster cluster ) {
+ logger.info( "connect to cluster: " + cluster.getDcaeLocationName());
+
+
+ provURL = cluster.getTopicProtocol() + "://" + cluster.getFqdn() + ":" + cluster.getTopicPort() + "/topics/create";
+
+ if ( cluster.getTopicProtocol().equals( "https" ) ) {
+ return makeSecureConnection( provURL );
+ }
+ return makeConnection( provURL );
+ }
+
+ private boolean makeSecureConnection( String pURL ) {
+ logger.info( "makeConnection to " + pURL );
+
+ try {
+ URL u = new URL( pURL );
+ uc = (HttpsURLConnection) u.openConnection();
+ uc.setInstanceFollowRedirects(false);
+ logger.info( "open connect to " + pURL );
+ return(true);
+ } catch( UnknownHostException uhe ){
+ logger.error( "Caught UnknownHostException for " + pURL);
+ return(false);