return true;
}
public void init(String[] args) throws ConfigurationException {
final ComponentLocator locator = ComponentLocator.getLocator("agent");
final Class<?> c = this.getClass();
_version = c.getPackage().getImplementationVersion();
if (_version == null) {
throw new CloudRuntimeException(
"Unable to find the implementation version of this agent");
}
s_logger.info("Implementation Version is " + _version);
loadProperties();
parseCommand(args);
List<String> properties = Collections.list((Enumeration<String>)_properties.propertyNames());
for (String property:properties){
s_logger.debug("Found property: " + property);
}
_storage = locator.getManager(StorageComponent.class);
if (_storage == null) {
s_logger.info("Defaulting to using properties file for storage");
_storage = new PropertiesStorage();
_storage.configure("Storage", new HashMap<String, Object>());
}
// merge with properties from command line to let resource access
// command line parameters
for (Map.Entry<String, Object> cmdLineProp : getCmdLineProperties()
.entrySet()) {
_properties.put(cmdLineProp.getKey(), cmdLineProp.getValue());
}
final Adapters adapters = locator.getAdapters(BackoffAlgorithm.class);
final Enumeration en = adapters.enumeration();
while (en.hasMoreElements()) {
_backoff = (BackoffAlgorithm) en.nextElement();
break;
}