private final InterfaceTaskAPI initInterface() throws SysException {
String lookup;
synchronized (prms) {
Map<String, String> values = prms.get(alias);
if (values == null)
throw new SysException("Unregistered TaskAPI by alias '" + alias + "'");
lookup = values.get("lookup");
}
InterfaceTaskAPI obj;
try {
obj = (InterfaceTaskAPI) Naming.lookup(lookup);
synchronized (sync) {
ta = obj.getInterfaceInstance(alias);
}
Set<String> s;
synchronized(classes) {
for (Map.Entry<Long, Set<String>> entry : classes.entrySet()) {
s = entry.getValue();
try {
ta.registerClasses(entry.getKey(), s);
} catch (RemoteException e1) {
throw new SysException(e1);
}
}
}
return ta;
} catch (MalformedURLException e) {
throw new SysException(e);
} catch (RemoteException e) {
throw new SysException(e);
} catch (NotBoundException e) {
throw new SysException(e);
}
}