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

Comparing projects/cms/source/server/uk/org/iscream/cms/server/core/Core.java (file contents):
Revision 1.18 by ajm, Tue Dec 12 18:26:52 2000 UTC vs.
Revision 1.26 by tdb, Sat May 18 18:16:01 2002 UTC

# Line 1 | Line 1
1 + /*
2 + * i-scream central monitoring system
3 + * Copyright (C) 2000-2002 i-scream
4 + *
5 + * This program is free software; you can redistribute it and/or
6 + * modify it under the terms of the GNU General Public License
7 + * as published by the Free Software Foundation; either version 2
8 + * of the License, or (at your option) any later version.
9 + *
10 + * This program is distributed in the hope that it will be useful,
11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 + * GNU General Public License for more details.
14 + *
15 + * You should have received a copy of the GNU General Public License
16 + * along with this program; if not, write to the Free Software
17 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 + */
19 +
20   //---PACKAGE DECLARATION---
21 < package uk.ac.ukc.iscream.core;
21 > package uk.org.iscream.cms.server.core;
22  
23   //---IMPORTS---
24 < import uk.ac.ukc.iscream.util.*;
24 > import uk.org.iscream.cms.server.util.*;
25 > import uk.org.iscream.cms.server.componentmanager.*;
26  
27   /**
28   * The main class for the CORE of the I-Scream system.
# Line 15 | Line 35 | import uk.ac.ukc.iscream.util.*;
35   * @author  $Author$
36   * @version $Id$
37   */
38 < public class Core implements uk.ac.ukc.iscream.util.Component {
38 > public class Core implements Component {
39  
40   //---FINAL ATTRIBUTES---
41  
# Line 25 | Line 45 | public class Core implements uk.ac.ukc.iscream.util.Co
45      public static final String REVISION = "$Revision$";
46      
47      /**
48 <     * The friendly name for the Core, used by
48 >     * The friendly name for this component, used by
49       * all related classes.
50       */
51 <    public static final String NAME = "CORE";
51 >    public static final String NAME = "Core";
52      
53   //---STATIC METHODS---
54  
# Line 41 | Line 61 | public class Core implements uk.ac.ukc.iscream.util.Co
61       * Currently the args are passed direct to the ORB,
62       * so any ORB paramaters could go there.
63       *
44     * @param args the command line arguments
64       */
65      public void start() throws ComponentStartException {
66          // start and bind each server in turn
67          
68          // work out which logger to use
69 <        String whichLogger = System.getProperty("uk.ac.ukc.iscream.LoggerClass");
70 <        String loggerPackage = System.getProperty("uk.ac.ukc.iscream.LoggerPackage");
69 >        String whichLogger = System.getProperty("uk.org.iscream.cms.server.LoggerClass");
70 >        String loggerPackage = System.getProperty("uk.org.iscream.cms.server.LoggerPackage");
71        
72          // construct the relevant LoggerImpl
73          LoggerImpl loggerImplRef = null;
# Line 58 | Line 77 | public class Core implements uk.ac.ukc.iscream.util.Co
77              // if anything goes wrong we throw a failed start exception
78              throw new ComponentStartException("unable to load logging class");
79          }
80 <        
80 >
81          // setup and bind the LoggerServant
82          LoggerServant loggerRef = new LoggerServant(loggerImplRef);
83          _refman.bindToOrb(loggerRef, "iscream.Logger");
# Line 76 | Line 95 | public class Core implements uk.ac.ukc.iscream.util.Co
95      }
96      
97      /**
98 +     * Does a dependency check. Used mainly at startup to
99 +     * see if the required dependencies (components) are up
100 +     * and running.
101 +     *
102 +     * @return a boolean value, true if the depdencies are satisfied
103 +     */
104 +    public boolean depCheck() {
105 +        // the core has no depedencies
106 +        return true;
107 +    }
108 +    
109 +    /**
110       * Overrides the {@link java.lang.Object#toString() Object.toString()}
111       * method to provide clean logging (every class should have this).
112       *
113 <     * This uses the uk.ac.ukc.iscream.util.NameFormat class
113 >     * This uses the uk.org.iscream.cms.server.util.NameFormat class
114       * to format the toString()
115       *
116       * @return the name of this class and its CVS revision
# Line 87 | Line 118 | public class Core implements uk.ac.ukc.iscream.util.Co
118      public String toString() {
119          return FormatName.getName(
120              _name,
121 <            this.getClass().getName(),
121 >            getClass().getName(),
122              REVISION);
123      }
124  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines