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.11 by ajm, Tue Dec 12 20:44:03 2000 UTC vs.
Revision 1.22 by tdb, Fri Jan 19 01:22:24 2001 UTC

# Line 4 | Line 4 | package uk.ac.ukc.iscream.rootfilter;
4   //---IMPORTS---
5   import uk.ac.ukc.iscream.util.*;
6   import uk.ac.ukc.iscream.core.*;
7 + import uk.ac.ukc.iscream.componentmanager.*;
8   import uk.ac.ukc.iscream.clientinterface.*;
9  
10   /**
# Line 17 | Line 18 | import uk.ac.ukc.iscream.clientinterface.*;
18   * @author  $Author$
19   * @version $Id$
20   */
21 < public class RootFilter implements uk.ac.ukc.iscream.util.Component {
21 > public class RootFilter implements Component {
22  
23   //---FINAL ATTRIBUTES---
24  
# Line 66 | Line 67 | public class RootFilter implements uk.ac.ukc.iscream.u
67          NAME = ourName;
68          
69          _logger.write(toString(), Logger.SYSINIT, "configured");
70 <                
70 >        
71 >        ClientInterface ciReal = null, ciDB = null;
72          // get reference to the client interfaces - the real time one
73          if (realInterface != null) {
74 <            ClientInterface ciReal = ClientInterfaceHelper.narrow(_refman.getCORBARef("iscream.ClientInterface." + realInterface));
74 >            ciReal = ClientInterfaceHelper.narrow(_refman.getCORBARef("iscream.ClientInterface." + realInterface));
75          }
76          // get reference to the client interfaces - and the db one
77          if (dbInterface != null) {
78 <            ClientInterface ciDB = ClientInterfaceHelper.narrow(_refman.getCORBARef("iscream.ClientInterface." + dbInterface));
78 >            ciDB = ClientInterfaceHelper.narrow(_refman.getCORBARef("iscream.ClientInterface." + dbInterface));
79          }
80 <
81 <        ClientInterface[] clientInterfaces;
80 >        
81 >        Queue queue = new Queue();
82 >        
83          if (realInterface == null) {        
84              _logger.write(toString(), Logger.DEBUG, "hooked to interfaces - " + dbInterface);
85 <            clientInterfaces = {ciReal, ciDB};
85 >            CIWrapper c = new CIWrapper(ciDB, queue);
86 >            c.start();
87          } else if (dbInterface == null) {
88              _logger.write(toString(), Logger.DEBUG, "hooked to interfaces - " + realInterface);
89 <            clientInterfaces = {ciReal};
89 >            CIWrapper c = new CIWrapper(ciReal, queue);
90 >            c.start();
91          } else {
92              _logger.write(toString(), Logger.DEBUG, "hooked to interfaces - " + realInterface + " & " + dbInterface);
93 <            clientInterfaces = {ciReal, ciDB};
93 >            CIWrapper c = new CIWrapper(ciReal, queue);
94 >            c.start();
95 >            c = new CIWrapper(ciDB, queue);
96 >            c.start();
97          }
98 <        
98 >                
99          // RootFilterServant start (for inbound child filter data)
100          _logger.write(toString(), Logger.DEBUG, "starting Root Filter");
101 <        RootFilterServant filterServant = new RootFilterServant(clientInterfaces);
101 >        RootFilterServant filterServant = new RootFilterServant(queue);
102          // bind to the naming service as a filter
103 <        _refman.bindToOrb(filterServant, "iscream.Filter." + _name);
103 >        _refman.bindToOrb(filterServant, "iscream.Filter." + RootFilter.NAME);
104          
105          _logger.write(toString(), Logger.SYSINIT, "started");
106 +        
107      }
108      
109      /**
# Line 108 | Line 117 | public class RootFilter implements uk.ac.ukc.iscream.u
117       */
118      public String toString() {
119          return FormatName.getName(
120 <            _name,
120 >            NAME,
121              getClass().getName(),
122              REVISION);
123      }
# Line 118 | Line 127 | public class RootFilter implements uk.ac.ukc.iscream.u
127   //---ACCESSOR/MUTATOR METHODS---
128  
129   //---ATTRIBUTES---
121
122    /**
123     * This is the friendly identifier of the
124     * component this class is running in.
125     * eg, a Filter may be called "filter1",
126     * If this class does not have an owning
127     * component,  a name from the configuration
128     * can be placed here.  This name could also
129     * be changed to null for utility classes.
130     */
131    private String _name = RootFilter.NAME;
130  
131      /**
132       * This holds a reference to the

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines