use of fish.payara.monitoring.rest.app.handler.ReadHandler in project Payara by payara.
the class MBeanBulkReadResource method handleRequest.
private Optional<JsonObject> handleRequest(final JsonObject jsonObject) {
// ignore non-read requests
String type = jsonObject.getString("type", "");
if (!"read".equalsIgnoreCase(type)) {
return Optional.empty();
}
String mbean = jsonObject.getString("mbean", "");
JsonValue attributes = jsonObject.getOrDefault("attribute", JsonValue.NULL);
ReadHandler handler = getReadHandler(mbean, attributes);
return Optional.of(handler.getResource());
}
Aggregations