Changeset 0f5161443456635a93cac5b1a773512418ebd578

Show
Ignore:
Timestamp:
05/23/09 04:16:49 (5 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1243052209 +0000
git-parent:

[8fd52de5ff1b33c4e303bd9c73fcd27898353757]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1243052209 +0000
Message:

make the NoitMetricNumeric? event a Java class instead on XMLDOM-based event. This gives us control. fixes #135

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/java/Makefile.in

    r24eac7c r0f51614  
    2626        com/omniti/reconnoiter/AMQOutput.java \ 
    2727        com/omniti/reconnoiter/event/NoitEvent.java \ 
     28        com/omniti/reconnoiter/event/NoitMetricNumeric.java \ 
    2829        com/omniti/reconnoiter/event/StratconQuery.java \ 
    2930        com/omniti/reconnoiter/event/StratconQueryStop.java \ 
     
    3233 
    3334SUPPORT=lib/activemq-all-5.2.0.jar lib/antlr-runtime-3.1.1.jar lib/esper-3.0.0.jar \ 
    34         lib/log4j-1.2.15.jar lib/spring-beans-2.5.5.jar lib/spring-context-2.5.5.jar 
     35        lib/log4j-1.2.15.jar lib/spring-beans-2.5.5.jar lib/spring-context-2.5.5.jar \ 
     36        lib/cglib-nodep-2.2.jar 
    3537 
    3638all:    reconnoiter.jar 
  • src/java/com/omniti/reconnoiter/AMQListener.java

    r546c63f r0f51614  
    1111import com.omniti.reconnoiter.AMQBrokerSingleton; 
    1212import com.omniti.reconnoiter.StratconMessage; 
    13 import com.omniti.reconnoiter.event.StratconQuery; 
    14 import com.omniti.reconnoiter.event.StratconQueryStop; 
    15 import com.omniti.reconnoiter.event.NoitEvent; 
     13import com.omniti.reconnoiter.event.*; 
    1614import java.lang.System; 
    1715import java.lang.Runnable; 
     
    9997              epService.getEPRuntime().sendEvent(((NoitEvent) m).getDocument()); 
    10098            } 
     99            else if(m instanceof NoitMetricNumeric) { 
     100              epService.getEPRuntime().sendEvent((NoitMetricNumeric) m); 
     101            } 
    101102          } catch(Exception ie) { 
    102103            System.err.println(ie); 
  • src/java/com/omniti/reconnoiter/IEPEngine.java

    r546c63f r0f51614  
    1414import com.omniti.reconnoiter.AMQListener; 
    1515import com.omniti.reconnoiter.event.NoitEvent; 
     16import com.omniti.reconnoiter.event.NoitMetricNumeric; 
    1617import com.espertech.esper.client.*; 
    1718import com.espertech.esper.client.soda.*; 
     
    2425 
    2526    Configuration config = new Configuration(); 
     27    config.addEventTypeAutoName("com.omniti.reconnoiter.event"); 
    2628    EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider(config); 
    27     config.addEventTypeAutoName("com.omniti.reconnoiter.event"); 
    2829    NoitEvent.registerTypes(epService); 
    2930 
  • src/java/com/omniti/reconnoiter/StratconMessage.java

    r546c63f r0f51614  
    1717import org.w3c.dom.Document; 
    1818import org.w3c.dom.Element; 
     19import org.w3c.dom.Text; 
    1920import org.w3c.dom.Node; 
     21import org.w3c.dom.NodeList; 
    2022 
    2123import com.omniti.reconnoiter.event.*; 
     
    4749      // We have events 
    4850      if(tag.equals("NoitStatus") || 
    49          tag.equals("NoitMetricNumeric") || 
    5051         tag.equals("NoitMetricText") || 
    5152         tag.equals("NoitCheck")) 
    5253        return new NoitEvent(document); 
     54      else if(tag.equals("NoitMetricNumeric")) { 
     55        // Numerics have a value that can be in scientific notation. 
     56        // This document gets passed places that do Xpath 1.0 queries 
     57        // which don't understand scientific notation... we have to hack it. 
     58        return new NoitMetricNumeric(document); 
     59      } 
    5360      // and requests 
    5461      else if(tag.equals("StratconQuery")) 
     
    5865    } 
    5966    catch(Exception e) { 
     67      System.err.println("makeMessage: " + e); 
    6068    } 
    6169    return null; 
  • src/java/com/omniti/reconnoiter/event/NoitEvent.java

    r546c63f r0f51614  
    4747    epService.getEPAdministrator().getConfiguration() 
    4848             .addEventType("NoitStatus", cfg); 
    49  
     49/* 
    5050    cfg = new ConfigurationEventTypeXMLDOM(); 
    5151    cfg.addXPathProperty("uuid", "/NoitMetricNumeric/id", XPathConstants.STRING); 
     
    5656    epService.getEPAdministrator().getConfiguration() 
    5757             .addEventType("NoitMetricNumeric", cfg); 
    58  
     58*/ 
    5959    cfg = new ConfigurationEventTypeXMLDOM(); 
    6060    cfg.addXPathProperty("uuid", "/NoitMetricText/id", XPathConstants.STRING); 
  • src/java/run-iep.sh.in

    ra907717 r0f51614  
    44JARS="reconnoiter.jar activemq-all-5.2.0.jar antlr-runtime-3.1.1.jar \ 
    55        esper-3.0.0.jar log4j-1.2.15.jar \ 
    6         spring-beans-2.5.5.jar spring-context-2.5.5.jar" 
     6        spring-beans-2.5.5.jar spring-context-2.5.5.jar \ 
     7        cglib-nodep-2.2.jar" 
    78 
    89DIRS=". lib @prefix@/java"