/**
* Handle status message, and updates state.
*/
private StatusType handleStatusMessage(GeneratedMessage msg) {
LauncherStatusResponse response = (LauncherStatusResponse) msg;
// LOG RESULT!
logger.finest("[LAUNCHER] Status: " + response.getStatus().toString());
if (response.hasExitcode()) {
logger.finest("[LAUNCHER] Status: exitCode=" + response.getExitcode());
}
if (response.hasCrashlog()) {
logger.finest("[LAUNCHER] Status: crashLog=yes");
} else {
logger.finest("[LAUNCHER] Status: crashLog=no");
}
if (response.getLogmessagesCount() > 0) {
for (String message : response.getLogmessagesList()) {
logger.finest("[LAUNCHER LOG] " + message);
}
} else {
logger.finest("[LAUNCHER LOG] No log...");
}
// Handle state
StatusType status = response.getStatus();
if (status == StatusType.CRASHED) {
if (response.hasCrashlog()) {
crashlog = response.getCrashlog().toStringUtf8();
} else {
crashlog = ""; // != NULL :-|
}
} else {
crashlog = null;