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.13 by ajm, Tue Dec 12 19:55:45 2000 UTC vs.
Revision 1.16 by tdb, Sun Jan 28 06:03:58 2001 UTC

# Line 4 | Line 4 | package uk.ac.ukc.iscream.filtermanager;
4   //---IMPORTS---
5   import uk.ac.ukc.iscream.util.*;
6   import uk.ac.ukc.iscream.core.*;
7 + import uk.ac.ukc.iscream.componentmanager.*;
8  
9   /**
10   * The FilterManager handles initialisation
# Line 14 | Line 15 | import uk.ac.ukc.iscream.core.*;
15   * @author  $Author$
16   * @version $Id$
17   */
18 < public class FilterManager implements uk.ac.ukc.iscream.util.Component {
18 > public class FilterManager implements Component {
19  
20   //---FINAL ATTRIBUTES---
21  
# Line 44 | Line 45 | public class FilterManager implements uk.ac.ukc.iscrea
45          
46          // configuration variable we require
47          int listenPort = 0;
48 <
48 >        
49          Configuration config = _refman.getCM().getConfiguration("FilterManager");
50          if (config == null) {
51 <            System.err.println("CRITICAL:Unable to obtain configuration" +
52 <                               "\n         Advise you check the i-scream log for more information.");
53 <            _logger.write(toString(), Logger.FATAL, "ERROR - unable to obtain configuration");
53 <            System.exit(1);
54 <        } else {
51 >            throw new ComponentStartException("Unable to obtain configuration for component");
52 >        }
53 >        else {
54              try {
55 +                // get the configuration properties we need
56                  listenPort = Integer.parseInt(config.getProperty("FilterManager.listenPort"));
57              } catch (org.omg.CORBA.MARSHAL e) {
58 <                System.err.println ("CRITICAL:Unable to obtain required configuration property" +
59 <                                    "\n         Advise you check the i-scream log for more information.");
60 <                _logger.write(toString(), Logger.FATAL, "ERROR - required configuration property not present");
61 <                System.exit(1);
58 >                throw new ComponentStartException("Unable to obtain requried configuration property for component");
59              }
60          }
61 <        
61 >                
62          _logger.write(toString(), Logger.SYSMSG, "configured");
63          
64 +        // startup a thread to listen for hosts
65          HostListener hostListener = new HostListener(listenPort);
66          hostListener.start();
67          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines