private void btnLoadActionPerformed(java.awt.event.ActionEvent evt) {
if(myService == null){
theLogger.warn("Unable to load config for null service.");
return;
}else if(myConfigClass == null || myConfigFactory == null){
theLogger.warn("Unable to load config, Config Params are null.");
return;
}
try{
String file = txtConfigPath.getText();
Class cls = myConfigClass;
Conf config = myConfigFactory.getValue();
Schema schema = config.getSchema();
AvroUtils.readFromFile(cls, config, schema, new File(file), true);
myService.initialize(config);
myStatusPanel.setStatusText("initialized");
}catch(Exception ex){
theLogger.error("There was an error initializing the service.", ex);
}
}