ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/rootfilter/RootFilter.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/rootfilter/RootFilter.java (file contents):
Revision 1.35 by tdb, Fri Mar 23 04:57:09 2001 UTC vs.
Revision 1.38 by tdb, Tue May 29 17:02:35 2001 UTC

# Line 1 | Line 1
1  
2   //---PACKAGE DECLARATION---
3 < package uk.org.iscream.rootfilter;
3 > package uk.org.iscream.cms.server.rootfilter;
4  
5   //---IMPORTS---
6 < import uk.org.iscream.util.*;
7 < import uk.org.iscream.core.*;
8 < import uk.org.iscream.componentmanager.*;
9 < import uk.org.iscream.clientinterface.*;
6 > import uk.org.iscream.cms.server.util.*;
7 > import uk.org.iscream.cms.server.core.*;
8 > import uk.org.iscream.cms.server.componentmanager.*;
9 > import uk.org.iscream.cms.server.clientinterface.*;
10  
11   /**
12   * The root filter is what all filters talk to
# Line 56 | Line 56 | public class RootFilter implements Component {
56          
57          // try and get the names of the ciReal and ciDB
58          String realInterface, dbInterface;
59 +        // first realtime
60          try {
61              realInterface = cp.getProperty(configName, "RootFilter.realtimeInterfaceName");
61            dbInterface = cp.getProperty(configName, "RootFilter.dbInterfaceName");
62          } catch (PropertyNotFoundException e) {
63              _logger.write(toString(), Logger.DEBUG, "Optional config not set: "+e);
64              realInterface = null;
65 +        }
66 +        // next dbi
67 +        try {
68 +            dbInterface = cp.getProperty(configName, "RootFilter.dbInterfaceName");
69 +        } catch (PropertyNotFoundException e) {
70 +            _logger.write(toString(), Logger.DEBUG, "Optional config not set: "+e);
71              dbInterface = null;
72          }
73          
# Line 113 | Line 119 | public class RootFilter implements Component {
119              _logger.write(toString(), Logger.WARNING, "failed to find queue monitor config, disabling. " + e);
120          }
121          
122 <        if (realInterface == null) {        
122 >        if (realInterface != null && dbInterface != null) {
123 >            _logger.write(toString(), Logger.DEBUG, "hooked to interfaces - " + realInterface + " & " + dbInterface);
124 >            CIWrapper c = new CIWrapper(ciReal, queue);
125 >            c.start();
126 >            c = new CIWrapper(ciDB, queue);
127 >            c.start();
128 >        } else if (realInterface == null) {        
129              _logger.write(toString(), Logger.DEBUG, "hooked to interfaces - " + dbInterface);
130              CIWrapper c = new CIWrapper(ciDB, queue);
131              c.start();
# Line 122 | Line 134 | public class RootFilter implements Component {
134              CIWrapper c = new CIWrapper(ciReal, queue);
135              c.start();
136          } else {
137 <            _logger.write(toString(), Logger.DEBUG, "hooked to interfaces - " + realInterface + " & " + dbInterface);
126 <            CIWrapper c = new CIWrapper(ciReal, queue);
127 <            c.start();
128 <            c = new CIWrapper(ciDB, queue);
129 <            c.start();
137 >            _logger.write(toString(), Logger.WARNING, "not hooked to any client interfaces, this is probably not intentional!");
138          }
139                  
140          // RootFilterServant start (for inbound child filter data)
# Line 192 | Line 200 | public class RootFilter implements Component {
200       * Overrides the {@link java.lang.Object#toString() Object.toString()}
201       * method to provide clean logging (every class should have this).
202       *
203 <     * This uses the uk.org.iscream.util.NameFormat class
203 >     * This uses the uk.org.iscream.cms.server.util.NameFormat class
204       * to format the toString()
205       *
206       * @return the name of this class and its CVS revision

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines