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

Comparing projects/cms/source/server/uk/org/iscream/cms/server/filtermanager/FilterManager.java (file contents):
Revision 1.3 by tdb, Thu Nov 16 18:14:05 2000 UTC vs.
Revision 1.9 by tdb, Wed Nov 29 19:19:12 2000 UTC

# Line 1 | Line 1
1   //---PACKAGE DECLARATION---
2 + package uk.ac.ukc.iscream.filtermanager;
3  
4   //---IMPORTS---
5   import uk.ac.ukc.iscream.core.*;
6   import uk.ac.ukc.iscream.filter.*;
7   import org.omg.CORBA.*;
8   import org.omg.CosNaming.*;
8 import org.omg.PortableServer.*;
9  
10   /**
11   * A FilterManager
# Line 36 | Line 36 | class FilterManager {
36              
37              // something to hold objects
38              org.omg.CORBA.Object objRef = null;    
39            
40            // get the Root POA
41            objRef = orb.resolve_initial_references("RootPOA");
42            POA poa = POAHelper.narrow(objRef);
39                
40              // get a hook to the name service
41              objRef = orb.resolve_initial_references("NameService");
42              NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
43                  
44              // get a ref to the Configurator & the Logger
45 <            objRef = ncRef.resolve(ncRef.to_name("iscream.Configurator"));
46 <            Configurator configurator = ConfiguratorHelper.narrow(objRef);
45 >            objRef = ncRef.resolve(ncRef.to_name("iscream.ConfigurationManager"));
46 >            ConfigurationManager configManager = ConfigurationManagerHelper.narrow(objRef);
47              objRef = ncRef.resolve(ncRef.to_name("iscream.Logger"));
48              Logger logger = LoggerHelper.narrow(objRef);
49              
50              logger.write(toString, Logger.SYSINIT, "coming up");
51              
52 <            // create the filterManagerRef to our servant
53 <            //filterManagerRef = new FilterManagerServant;
52 >            // create the servant
53 >            //FilterManagerServant servant = new FilterManagerServant(logger);
54              
55              // register the servant with the name service
56 <            //objRef = poa.servant_to_reference(filterManagerRef);
56 >            //objRef = poa.servant_to_reference(servant);
57              //ncRef.bind(ncRef.to_name("iscream.FilterManager"), objRef);
58              
59              // start the POA off
60 <            poa.the_POAManager().activate();
60 >            //poa.the_POAManager().activate();
61              
62              // get the config
63 <            Configuration myConfig = configurator.getConfiguration("filterManager");
63 >            Configuration myConfig = configManager.getConfiguration("FilterManager");
64              
65              // some place holders for the configuration
66              int port = 0;
# Line 77 | Line 73 | class FilterManager {
73                
74                  // get the property
75                  try {
76 <                    port = new Integer(myConfig.getProperty("listenPort")).intValue();
76 >                    port = new Integer(myConfig.getProperty("FilterManager.listenPort")).intValue();
77                  } catch (org.omg.CORBA.MARSHAL e) {
78                      System.out.println("Caught org.omg.CORBA.MARSHAL, must be a null we got back");
79                      System.exit(1);
80                  }
81              }
82 <            logger.write(toString, Logger.SYSINIT, "configured");
82 >            logger.write(toString, Logger.SYSMSG, "configured");
83              logger.write(toString, Logger.SYSINIT, "starting listener");
84              
85 <            FilterManagerListener fml = new FilterManagerListener(logger, configurator, port);
86 <            fml.start();
85 >            HostListener hostListener = new HostListener(logger, configManager, port, ncRef);
86 >            hostListener.start();
87              
88              logger.write(toString, Logger.SYSINIT, "started");
89              

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines