A helper class to provide uniform way of allowing Keel components to acquire collaborator components. When looking up services/components from the container, a "hint" is needed. When "default" or a particular service hint is hardcoded for acquiring the service, it prevents the use of configuration to specify which implementation to use for a particular service. Instead this class allows a standard way of acquiring the hint from configuration, before looking up a service, thereby allowing a particular installation to change which component is used. To use, a class variable is first declared:
ServiceConfig svcConfig = null;
and initialized somewhere before use:
svcConfig = new ServiceConfig(configuration);
where "configuration" is standard Avalon XML config for a component. This class looks for configuration of the form:
Finally, when looking up a service, the hint is provided as:
svcCOnfig.getHint(someRole);
If no configuration is provided at all (i.e. current config files), then getHint simply returns "default".
@author Shash Chatterjee
@date Mar 9, 2004
@version $Revision: 1.3 $ $Date: 2004/03/10 03:36:15 $