Package stream.runtime.setup.factory

Examples of stream.runtime.setup.factory.ObjectFactory


    if (candidateNodes == null || candidateNodes.getLength() == 0) {
      log.debug("List of candidateNodes is empty: {}", candidateNodes);
      return;
    }

    ObjectFactory of = ObjectFactory.newInstance();
    for (int i = 0; i < candidateNodes.getLength(); i++) {

      Node node = candidateNodes.item(i);
      if (node.getNodeType() == Node.ELEMENT_NODE
          && node.getNodeName().equalsIgnoreCase("processor")) {

        try {
          Map<String, String> params = of.getAttributes(node);

          Double priority = new Double(1000.0d);
          if (params.get("priority") != null)
            priority = new Double(params.get("priority"));

          log.info("Found priority {}", priority);

          Object o = of.create((Element) node);

          if (o instanceof EventProcessor) {
            @SuppressWarnings({ "unchecked" })
            EventProcessor<AuditEvent> eventProcessor = (EventProcessor<AuditEvent>) o;
            log.info(
View Full Code Here

TOP

Related Classes of stream.runtime.setup.factory.ObjectFactory

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.