use of si.ijs.maci.Manager in project ACS by ACS-Community.
the class TreeMouseListener method getLogConfFromService.
private LoggingConfigurableOperations getLogConfFromService(final String serviceName) throws Exception {
System.out.println("Getting LoggingConfigurable out of Manager for service " + serviceName);
// Manager
final Manager mgr = model.getManagerRef();
if (mgr == null) {
throw new Exception("Invalid manager reference");
}
SwingWorker<LoggingConfigurableOperations, Void> worker = new SwingWorker<LoggingConfigurableOperations, Void>() {
protected LoggingConfigurableOperations doInBackground() throws Exception {
LoggingConfigurableOperations logConf;
try {
logConf = LoggingConfigurableHelper.narrow(mgr.get_service(model.getAdminClient().getHandle(), serviceName, false));
} catch (Throwable t) {
throw new Exception("Error getting the LoggingConfigurable out of Manager for service " + serviceName + " :\n" + t.getMessage(), t);
}
return logConf;
}
};
worker.execute();
return worker.get();
}
use of si.ijs.maci.Manager in project ACS by ACS-Community.
the class TreeMouseListener method getLogConfFromManager.
/**
* Get the LoggingConfigurable out of the manager
*
* @return The LoggingConfigurable for the manager
*/
private LoggingConfigurableOperations getLogConfFromManager() throws Exception {
System.out.println("Getting LoggingConfigurable out of Manager");
// Manager
Manager mgr = model.getManagerRef();
if (mgr == null) {
throw new Exception("Invalid manager reference");
}
SwingWorker<LoggingConfigurableOperations, Void> worker = new SwingWorker<LoggingConfigurableOperations, Void>() {
protected LoggingConfigurableOperations doInBackground() throws Exception {
LoggingConfigurableOperations logConf;
try {
logConf = LoggingConfigurableHelper.narrow(model.getManagerRef());
} catch (Throwable t) {
throw new Exception("Error getting the LoggingConfigurable out of Manager:\n" + t.getMessage(), t);
}
return logConf;
}
};
worker.execute();
return worker.get();
}
Aggregations