@Override
public void onAdminCommandEvent(String name, GfSseInboundEvent event) {
try {
AdminCommandState acs = event.getData(AdminCommandState.class, "application/json");
String id = acs.getId();
if (StringUtils.ok(id)) {
if (terse) {
rac.closeSse(id, ActionReport.ExitCode.SUCCESS);
} else {
rac.closeSse(strings.get("detach.jobid", id), ActionReport.ExitCode.SUCCESS);
}
} else {
logger.log(Level.SEVERE, strings.getString("detach.noid", "Command was started but id was not retrieved. Can not detach."));
}
} catch (IOException ex) {
logger.log(Level.SEVERE, null, ex);
}
}