@Override
protected void get(IServletRequest request, IServletResponse response) {
response.setStatus(HttpResponseStatus.OK);
ICcApplicationContext props = (ICcApplicationContext) ctx.get(ASTERIX_APP_CONTEXT_INFO_ATTR);
Map<String, String> buildProperties = props.getBuildProperties().getAllProps();
ObjectNode responseObject = OBJECT_MAPPER.createObjectNode();
buildProperties.forEach(responseObject::put);
try {
HttpUtil.setContentType(response, HttpUtil.ContentType.TEXT_PLAIN, HttpUtil.Encoding.UTF8);
} catch (IOException e) {
LOGGER.log(Level.WARN, "Failure handling request", e);
response.setStatus(HttpResponseStatus.INTERNAL_SERVER_ERROR);
return;
}
PrintWriter responseWriter = response.writer();
responseWriter.write(responseObject.toString());
responseWriter.flush();
}