String daemonRegistryDir = matcher.group(3);
String pidStr = matcher.group(4);
Long pid = pidStr.equals("null") ? null : Long.parseLong(pidStr);
Integer idleTimeout = Integer.decode(matcher.group(5));
List<String> jvmOpts = Lists.newArrayList(Splitter.on(',').split(matcher.group(6)));
return new DefaultDaemonContext(uid, new File(javaHome), new File(daemonRegistryDir), pid, idleTimeout, jvmOpts);
} else {
return null;
}
}