Changeset 99eb5f9b691a24762868afc59df563b16854891e

Show
Ignore:
Timestamp:
11/07/09 23:51:31 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1257637891 +0000
git-parent:

[d38990d06dbc481418b2317122b36d481acdae86]

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

no user-facing changes -- just make this a but more encapsulated

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/java/com/omniti/reconnoiter/IEPEngine.java

    rc75a210 r99eb5f9  
    2222 
    2323class IEPEngine { 
    24   static public void main(String[] args) { 
    25     BasicConfigurator.configure(); 
    26     if(args.length != 1) { 
    27       System.err.println("Requires exactly one argument"); 
    28       return; 
    29     } 
    30     StratconConfig sconf = new StratconConfig(args[0]); 
     24  private MQListener mql; 
    3125 
     26  public IEPEngine(StratconConfig sconf) { 
    3227    Configuration config = new Configuration(); 
    3328    config.addDatabaseReference("recondb", sconf.getDBConfig()); 
     
    3833    EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider(config); 
    3934 
    40     MQListener l = new MQListener(epService, BrokerFactory.getBroker(sconf)); 
     35    mql = new MQListener(epService, BrokerFactory.getBroker(sconf)); 
     36  } 
    4137 
    42     Thread listener = new Thread(l); 
     38  public void start() { 
     39    Thread listener = new Thread(mql); 
    4340    listener.start(); 
     41  } 
    4442 
     43  static public void main(String[] args) { 
     44    BasicConfigurator.configure(); 
     45    if(args.length != 1) { 
     46      System.err.println("Requires exactly one argument"); 
     47      return; 
     48    } 
     49    StratconConfig sconf = new StratconConfig(args[0]); 
     50    (new IEPEngine(sconf)).start(); 
     51 
     52    System.err.println("IEPEngine ready..."); 
    4553    BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); 
    4654    while(true) {