1 |
|
/* |
2 |
|
* i-scream central monitoring system |
3 |
+ |
* http://www.i-scream.org.uk |
4 |
|
* Copyright (C) 2000-2002 i-scream |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or |
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.server.util.*; |
28 |
> |
import uk.org.iscream.cms.util.*; |
29 |
|
|
30 |
|
/** |
31 |
|
* A startup component for the Local Clients. |
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"); |
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; |
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.cms.server.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 |