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

Comparing projects/cms/source/server/uk/org/iscream/cms/server/client/ClientMain.java (file contents):
Revision 1.19 by ajm, Fri Mar 23 02:30:44 2001 UTC vs.
Revision 1.26 by tdb, Sun Aug 1 10:40:40 2004 UTC

# Line 1 | Line 1
1 + /*
2 + * i-scream central monitoring system
3 + * http://www.i-scream.org
4 + * Copyright (C) 2000-2002 i-scream
5 + *
6 + * This program is free software; you can redistribute it and/or
7 + * modify it under the terms of the GNU General Public License
8 + * as published by the Free Software Foundation; either version 2
9 + * of the License, or (at your option) any later version.
10 + *
11 + * This program is distributed in the hope that it will be useful,
12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 + * GNU General Public License for more details.
15 + *
16 + * You should have received a copy of the GNU General Public License
17 + * along with this program; if not, write to the Free Software
18 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19 + */
20 +
21   //---PACKAGE DECLARATION---
22 < package uk.org.iscream.client;
22 > package uk.org.iscream.cms.server.client;
23  
24   //---IMPORTS---
25 < import uk.org.iscream.clientinterface.*;
26 < import uk.org.iscream.componentmanager.*;
27 < import uk.org.iscream.core.*;
28 < import uk.org.iscream.util.*;
25 > import uk.org.iscream.cms.server.clientinterface.*;
26 > import uk.org.iscream.cms.server.componentmanager.*;
27 > import uk.org.iscream.cms.server.core.*;
28 > import uk.org.iscream.cms.util.*;
29  
30   /**
31   * A startup component for the Local Clients.
# Line 95 | Line 115 | public class ClientMain implements Component {
115              _monitorQueue.startMonitor(queueMonitorInterval*1000, _monitorQueue, NAME + " Monitor");
116          } catch (PropertyNotFoundException e) {
117              _logger.write(toString(), Logger.WARNING, "failed to find queue monitor config, disabling. " + e);
118 <        }        
118 >        }
119          
120          // setup the servant and connect
121 <        _logger.write(toString(), Logger.SYSINIT, "starting servant and connecting");          
121 >        _logger.write(toString(), Logger.SYSINIT, "starting servant and connecting");
122          try {
123              ClientServant ref = new ClientServant(_monitorQueue);
124              org.omg.CORBA.Object objRef = _refman.getRootPOA().servant_to_reference(ref);
125              Client client = ClientHelper.narrow(objRef);
126              
127 <            // this name maybe shouldn't be static
128 <            objRef = _refman.getCORBARef("iscream.ClientInterface.CorbaListener");
127 >            String parent = ConfigurationProxy.getInstance().getProperty("Client." + ClientMain.NAME, "Client.parent");
128 >            objRef = _refman.getCORBARef("iscream.ClientInterface\\." + parent);
129              CorbaClientListener listener = CorbaClientListenerHelper.narrow(objRef);
130              
131              _logger.write(toString(), Logger.SYSINIT, "connecting");
# Line 143 | Line 163 | public class ClientMain implements Component {
163              obj = _refman.getCORBARef("iscream.ConfigurationManager");
164              // then get some info on the CLI
165              ConfigurationProxy cp = ConfigurationProxy.getInstance();
166 <            String cli = cp.getProperty("RootFilter", "RootFilter.realtimeInterfaceName");
166 >            String parentName = cp.getProperty("Client." + ClientMain.NAME, "Client.parent");
167              // finally check the CLI is alive
168 <            obj = _refman.getCORBARef("iscream.ClientInterface." + cli);
168 >            obj = _refman.getCORBARef("iscream.ClientInterface\\." + parentName);
169          } catch(ComponentCORBAException e) {
170              System.err.println(toString() + ": Dependency Failure: "+e);
171              return false;
# Line 161 | Line 181 | public class ClientMain implements Component {
181       * Overrides the {@link java.lang.Object#toString() Object.toString()}
182       * method to provide clean logging (every class should have this).
183       *
184 <     * This uses the uk.org.iscream.util.FormatName class
184 >     * This uses the uk.org.iscream.cms.util.FormatName class
185       * to format the toString()
186       *
187       * @return the name of this class and its CVS revision

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines