client, RestController controller) { super(settings, controller, client); controller.registerHandler(Method.GET, "/_tssl/state", this); controller.registerHandler(Method.POST, "/_tssl/state", this); } @Override protected void handleRequest(RestRequest request, RestChannel channel, Client client) throws Exception { XContentBuilder builder = JsonXContent.contentBuilder(); builder.startObject(); builder.field("enabled_protocols", SecurityUtil.ENABLED_SSL_PROTOCOLS); builder.field("enabled_chipers", SecurityUtil.ENABLED_SSL_CIPHERS); builder.endObject(); channel.sendResponse(new BytesRestResponse(RestStatus.OK, builder)); } } Register a handler for an endpoint Register a handler for an endpoint Send a JSON response Send a JSON response