public class ChimeraManager
{
- static private Process chimera;
+ private Process chimera;
- static private ListenerThreads chimeraListenerThreads;
+ private ListenerThreads chimeraListenerThreads;
- static private Map<Integer, ChimeraModel> currentModelsMap;
+ private Map<Integer, ChimeraModel> currentModelsMap;
- private static Logger logger = LoggerFactory
+ private Logger logger = LoggerFactory
.getLogger(ext.edu.ucsf.rbvi.strucviz2.ChimeraManager.class);
private StructureManager structureManager;
chimera = null;
chimeraListenerThreads = null;
currentModelsMap = new HashMap<Integer, ChimeraModel>();
-
+
}
public List<ChimeraModel> getChimeraModels(String modelName)
}
return values;
}
- private volatile boolean busy=false;
+
+ private volatile boolean busy = false;
+
/**
* Send a command to Chimera.
*
}
while (busy)
{
- try {
+ try
+ {
Thread.sleep(25);
- } catch (InterruptedException q) {};
+ } catch (InterruptedException q)
+ {
+ }
+ ;
}
- busy=true;
+ busy = true;
chimeraListenerThreads.clearResponse(command);
String text = command.concat("\n");
// System.out.println("send command to chimera: " + text);
logger.warn("Unable to execute command: " + text);
logger.warn("Exiting...");
clearOnChimeraExit();
- busy=false;
+ busy = false;
return null;
}
if (!reply)
{
- busy=false;
+ busy = false;
return null;
}
List<String> rsp = chimeraListenerThreads.getResponse(command);
- busy=false;
+ busy = false;
return rsp;
}
return structureManager;
}
+ public boolean isBusy()
+ {
+ return busy;
+ }
+
}