}
private void getFutureResult() {
try {
InstanceCommandResult r = future.get(timeoutInMsec, TimeUnit.MILLISECONDS);
InstanceCommandExecutor res = (InstanceCommandExecutor) r.getInstanceCommand();
String instanceLocation = res.getCommandOutput();
// Remove the pesky \n out
instanceLocation = (instanceLocation == null) ? "" : instanceLocation.trim();
if ((!instanceLocation.endsWith(res.getServer().getName()))
|| (res.getReport().getActionExitCode() != ActionReport.ExitCode.SUCCESS)) {
uptime = -1;
state = NOT_RUNNING;
running = false;
pid = -1;
ssState = stateService.setState(name, InstanceState.StateType.NOT_RUNNING, false);
}
else {
Properties props = res.getReport().getTopMessagePart().getProps();
String uptimeStr = props.getProperty("Uptime");
String pidstr = props.getProperty("Pid");
String restartstr = props.getProperty("Restart-Required");
try {