ServletContext sc;
@GET
public JsonObject info() {
JsonObjectBuilder builder = Json.createObjectBuilder();
OneShot info = this.information.fetch();
String version = "--", uptime = "--";
if (info != null) {
version = info.getVersion();
}
builder.add("version", version);
if (info != null) {
uptime = info.getUptime();
}
builder.add("uptime", uptime);
return builder.build();
}