104 |
|
_logger.write(toString(), Logger.SYSINIT, "started"); |
105 |
|
|
106 |
|
} |
107 |
< |
|
107 |
> |
|
108 |
> |
/** |
109 |
> |
* Does a dependency check. Used mainly at startup to |
110 |
> |
* see if the required dependencies (components) are up |
111 |
> |
* and running. |
112 |
> |
* |
113 |
> |
* @return a boolean value, true if the depdencies are satisfied |
114 |
> |
*/ |
115 |
> |
public boolean depCheck() { |
116 |
> |
try { |
117 |
> |
org.omg.CORBA.Object obj; |
118 |
> |
// first check the ConfigurationManager is alive |
119 |
> |
obj = _refman.getCORBARef("iscream.ConfigurationManager"); |
120 |
> |
// then get some info on the CLI |
121 |
> |
ConfigurationProxy cp = ConfigurationProxy.getInstance(); |
122 |
> |
String cli = cp.getProperty("RootFilter", "RootFilter.realtimeInterfaceName"); |
123 |
> |
// finally check the CLI is alive |
124 |
> |
obj = _refman.getCORBARef("iscream.ClientInterface." + cli); |
125 |
> |
} catch(ComponentCORBAException e) { |
126 |
> |
_logger.write(toString(), Logger.WARNING, "Dependency Failure: "+e); |
127 |
> |
return false; |
128 |
> |
} catch(PropertyNotFoundException e) { |
129 |
> |
_logger.write(toString(), Logger.WARNING, "Unable to obtain configuration: "+e); |
130 |
> |
return false; |
131 |
> |
} |
132 |
> |
// dependency check suceeded |
133 |
> |
return true; |
134 |
> |
} |
135 |
> |
|
136 |
|
/** |
137 |
|
* Overrides the {@link java.lang.Object#toString() Object.toString()} |
138 |
|
* method to provide clean logging (every class should have this). |