93 |
|
|
94 |
|
_logger.write(toString(), Logger.SYSINIT, "started"); |
95 |
|
} |
96 |
< |
|
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 |
> |
try { |
106 |
> |
org.omg.CORBA.Object obj; |
107 |
> |
// first check the ConfigurationManager is alive |
108 |
> |
obj = _refman.getCORBARef("iscream.ConfigurationManager"); |
109 |
> |
// then suss out our parent filter |
110 |
> |
ConfigurationProxy cp = ConfigurationProxy.getInstance(); |
111 |
> |
String parentFilterName = cp.getProperty(NAME, "Filter.parentFilter"); |
112 |
> |
// finally check the parent filter is alive |
113 |
> |
obj = _refman.getCORBARef("iscream.Filter." + parentFilterName); |
114 |
> |
} catch(ComponentCORBAException e) { |
115 |
> |
_logger.write(toString(), Logger.WARNING, "Dependency Failure: "+e); |
116 |
> |
return false; |
117 |
> |
} catch(PropertyNotFoundException e) { |
118 |
> |
_logger.write(toString(), Logger.WARNING, "Unable to obtain configuration: "+e); |
119 |
> |
return false; |
120 |
> |
} |
121 |
> |
// dependency check suceeded |
122 |
> |
return true; |
123 |
> |
} |
124 |
> |
|
125 |
|
/** |
126 |
|
* Overrides the {@link java.lang.Object#toString() Object.toString()} |
127 |
|
* method to provide clean logging (every class should have this). |