private boolean processMessage(VMMessage aMsg) { VMMsgType aType = aMsg.getMessageType(); int numVMs = aMsg.getPrivateData(); switch (aType) { case LAUNCH: return launchVM(numVMs, null); } return false; }
public void run() { VMMessage aMsg = null; while (!done) { try { aMsg = msgQueue.take(); PrintMsg.print(DMsgType.MSG, "message type = " + aMsg.toString()); processMessage(aMsg); } catch (InterruptedException e) { e.printStackTrace(); } } }