Package com.ufis_as.ek_if.ufis

Examples of com.ufis_as.ek_if.ufis.InterfaceMqConfig


        int infList = config.getList("Interfaces.Interface.name").size();
        if (infList > 0) {
            for (int i = 0; i < infList; i++) {
                InterfaceConfig interfaceConfig = new InterfaceConfig();
                InterfaceMqConfig fromMq = new InterfaceMqConfig();
                InterfaceMqConfig toMq = new InterfaceMqConfig();
                HierarchicalConfiguration fromMqConfig = config.configurationAt("Interfaces.Interface(" + i + ").FromMq");
                HierarchicalConfiguration toMqConfig = config.configurationAt("Interfaces.Interface(" + i + ").ToMq");
                String name = config.getString("Interfaces.Interface(" + i + ").name");
                String xsd = config.getString("Interfaces.Interface(" + i + ").xsd");
                String className = config.getString("Interfaces.Interface(" + i + ").classname");
                String regExp = config.getString("Interfaces.Interface(" + i + ").regexp");

                interfaceConfig.setName(name);
                interfaceConfig.setXsd(xsd);
                interfaceConfig.setClassName(className);
                interfaceConfig.setRegexp(regExp);

                fromMq.setUrl(fromMqConfig.getString("url"));
                fromMq.setUserName(fromMqConfig.getString("username"));
                fromMq.setPassword(fromMqConfig.getString("password"));
                fromMq.setQueueName(fromMqConfig.getString("queue"));
                fromMq.setEnabled(fromMqConfig.getString("enabled"));
                interfaceConfig.setFromMq(fromMq);

                toMq.setUrl(toMqConfig.getString("url"));
                toMq.setUserName(toMqConfig.getString("username"));
                toMq.setPassword(toMqConfig.getString("password"));
                toMq.setQueueName(toMqConfig.getString("queue"));
                toMq.setEnabled(toMqConfig.getString("enabled"));
                interfaceConfig.setToMq(toMq);
                interfaceConfigs.add(interfaceConfig);
            }
        }
    }//end getInterfaceConfig()
View Full Code Here


    // loadConfigFile(configFile);
    interfaceConfigs = _startupInitSingleton.getInterfaceConfigs();
    if (interfaceConfigs.size() > 0) {
      infconfig = interfaceConfigs.get(0);
      InterfaceMqConfig fromMqConfig = infconfig.getFromMq();
      // tibco enabled or not
      if ("TRUE".equalsIgnoreCase(fromMqConfig.getEnabled())) {
       
        String user = fromMqConfig.getUserName();
       
        // Call the common function to decrypt the password
        // Use (16 bytes = 128 bit) secret key.
       
        //String user = HpAESEncryptAndDecrypt.symmetricDecrypt(fromMqConfig.getUserName(), HpEKConstants.UFIS_APP_KEY);
       
        String pwd = HpAESEncryptAndDecrypt.symmetricDecrypt(fromMqConfig.getPassword(), HpEKConstants.UFIS_APP_KEY);
        LOG.debug("Input tibco user name : {} and password : {}", user, pwd);
       
        /*String pwd = fromMqConfig.getPassword();*/
        LOG.debug("Tibco connection url : {}", fromMqConfig.getUrl());
        connectTibco(fromMqConfig.getUrl(), user, pwd);
       
        isTibcoOn = true;
        HpCommonConfig.isTibcoOn = true;
      }

      InterfaceMqConfig toMqConfig = infconfig.getToMq();
      // activemq enabled or not
      if ("TRUE".equalsIgnoreCase(toMqConfig.getEnabled())) {
        connectActiveMQ(toMqConfig.getUrl(), toMqConfig.getUserName(),
            toMqConfig.getPassword());
        isAmqOn = true;
        HpCommonConfig.isAmqOn = true;
      }
    }
  }
View Full Code Here

        if (interfaceConfigs.size() == 0) {
          LOG.info("!!! Config for TIBCO is empty. Reconnection will not be performed.");
          return;
        }
        infconfig = interfaceConfigs.get(0);
        InterfaceMqConfig fromMqConfig = infconfig.getFromMq();

        String user = fromMqConfig.getUserName();
       
        // Call the common function to decrypt the password
        // Use (16 bytes = 128 bit) secret key.
        String pwd = HpAESEncryptAndDecrypt.symmetricDecrypt(fromMqConfig.getPassword(), HpEKConstants.UFIS_APP_KEY);
       
        boolean reconnected = connectTibco(fromMqConfig.getUrl(), user, pwd);
        LOG.error(Tibjms.getConnectionActiveURL(HpCommonConfig.tibcoConn));
       
        /*  boolean reconnected = connectTibco(fromMqConfig.getUrl(),
          fromMqConfig.getUserName(), fromMqConfig.getPassword());*/
        setTibcoOn(reconnected);
 
View Full Code Here

        int infList = extConfig.getList("Interfaces.Interface.name")
            .size();
        if (infList > 0) {
          for (int i = 0; i < infList; i++) {
            InterfaceConfig interfaceConfig = new InterfaceConfig();
            InterfaceMqConfig fromMq = new InterfaceMqConfig();
            InterfaceMqConfig toMq = new InterfaceMqConfig();
            HierarchicalConfiguration fromMqConfig = extConfig
                .configurationAt("Interfaces.Interface(" + i
                    + ").FromMq");
            HierarchicalConfiguration toMqConfig = extConfig
                .configurationAt("Interfaces.Interface(" + i
                    + ").ToMq");
            String name = extConfig
                .getString("Interfaces.Interface(" + i
                    + ").name");
            String xsd = extConfig
                .getString("Interfaces.Interface(" + i
                    + ").xsd");
            String className = extConfig
                .getString("Interfaces.Interface(" + i
                    + ").classname");
            String regExp = extConfig
                .getString("Interfaces.Interface(" + i
                    + ").regexp");

            interfaceConfig.setName(name);
            interfaceConfig.setXsd(xsd);
            interfaceConfig.setClassName(className);
            interfaceConfig.setRegexp(regExp);

            LOG.debug("FROM URL : {}", fromMqConfig.getString("url"));
            fromMq.setUrl(fromMqConfig.getString("url"));
            fromMq.setUserName(fromMqConfig.getString("username"));
            fromMq.setPassword(fromMqConfig.getString("password"));
            fromMq.setQueueName(fromMqConfig.getString("queue"));
            fromMq.setEnabled(fromMqConfig.getString("enabled"));
            interfaceConfig.setFromMq(fromMq);

            List<Object> from = fromMqConfig.getList("queue");
            if (from != null && from.size() > 0) {
              for (int j = 0; j < from.size(); j++) {
                fromQueueList.add(from.get(j) == null ? ""
                    : from.get(j).toString());
                LOG.debug("Loaded Q from config : <{}>", from
                    .get(j).toString());

              }
            }
            List<Object> fromTopics = toMqConfig.getList("topic");
            if (fromTopics != null && fromTopics.size() > 0) {
              for (int j = 0; j < fromTopics.size(); j++) {
                fromTopicList
                    .add(fromTopics.get(j) == null ? ""
                        : fromTopics.get(j).toString());
              }
            }

            LOG.debug("URL : {}", toMqConfig.getString("url"));
            toMq.setUrl(toMqConfig.getString("url"));
            toMq.setUserName(toMqConfig.getString("username"));
            toMq.setPassword(toMqConfig.getString("password"));
            toMq.setEnabled(toMqConfig.getString("enabled"));
            interfaceConfig.setToMq(toMq);

            List<Object> to = toMqConfig.getList("queue");
            if (to != null && to.size() > 0) {
              for (int j = 0; j < to.size(); j++) {
View Full Code Here

TOP

Related Classes of com.ufis_as.ek_if.ufis.InterfaceMqConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.