Package com.ufis_as.ek_if.ufis

Examples of com.ufis_as.ek_if.ufis.InterfaceConfig


        }

        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


        LOG.error("The configuration is not set properly in Config File. Pls check the configuration.");
      }
      Iterator<InterfaceConfig> it = configList.iterator();

      while (it.hasNext()) {
        InterfaceConfig inConfig = it.next();
        if ("belt".equalsIgnoreCase(inConfig.getName())) {
          if (HpUfisUtils.isNullOrEmptyStr(queue)) {
          if (!_startupInitSingleton.getFromQueueList().isEmpty()) {
            queue = _startupInitSingleton.getFromQueueList().get(0);
          } else {
            queue = HpEKConstants.DEFAULT_BELT_QUEUE;
View Full Code Here

        LOG.error("The configuration is not set properly in Config File. Pls check the configuration.");
      }
      Iterator<InterfaceConfig> it = configList.iterator();

      while (it.hasNext()) {
        InterfaceConfig inConfig = it.next();
        if ("acts".equalsIgnoreCase(inConfig.getName())) {
          // if (!_startupInitSingleton.getFromQueueList().isEmpty())
          // {
          if (HpUfisUtils.isNullOrEmptyStr(queue)) {
            if (!_startupInitSingleton.getFromQueueList().isEmpty()) {
              queue = _startupInitSingleton.getFromQueueList()
View Full Code Here

        LOG.error("The configuration is not set properly in Config File. Pls check the configuration.");
      }
      Iterator<InterfaceConfig> it = configList.iterator();

      while (it.hasNext()) {
        InterfaceConfig inConfig = it.next();
        if (HpEKConstants.LOAD_CONTROL_MSG.equalsIgnoreCase(inConfig
            .getName())) {
          if (HpUfisUtils.isNullOrEmptyStr(queue)) {
            /*
             * if
             * (!_startupInitSingleton.getToQueueList().isEmpty()) {
View Full Code Here

        LOG.error("The configuration is not set properly in Config File. Pls check the configuration.");
      }
      Iterator<InterfaceConfig> it = configList.iterator();

      while (it.hasNext()) {
        InterfaceConfig inConfig = it.next();
        if ("proveo".equalsIgnoreCase(inConfig.getName())) {
          if (HpUfisUtils.isNullOrEmptyStr(queue)) {
            if (!defaultQueueList.isEmpty()) {
              for(String queueName:defaultQueueList)
              {
                if(!queueList.contains(queueName))
View Full Code Here

        // interfaces config (ESB, MQ)
        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++) {
                toQueueList.add(to.get(j) == null ? "" : to
View Full Code Here

    if(interfaceConfigs.isEmpty()) {
      LOG.warn("There is no configuration for AMQ and TIBCO. The message will not be sent out.");
      return;
    }
   
    InterfaceConfig interfaceConfig = interfaceConfigs.get(0);
   
    //From Q [AMQ]
    fromMqConfig = interfaceConfig.getFromMq();
    enabledFromQ = Boolean.parseBoolean(fromMqConfig.getEnabled());
    if(enabledFromQ) {
      LOG.debug("'FROM Q' config : {}", fromMqConfig.getUrl());
      boolean connected = connectActiveMQ(fromMqConfig.getUrl(), fromMqConfig.getUserName(), fromMqConfig.getPassword());
      setAmqOn(connected);
    }
   
    //To Q [TIBCO]
    toMqConfig = interfaceConfig.getToMq();
    enabledToQ = Boolean.parseBoolean(toMqConfig.getEnabled());
    if(enabledToQ) {
      LOG.debug("'TO Q' config : {}", toMqConfig.getUrl());
      boolean connected = connectTibco(toMqConfig.getUrl(), toMqConfig.getUserName(), toMqConfig.getPassword());
      setTibcoOn(connected);
View Full Code Here

TOP

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

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.