private Callback<Void> securityPostProcessRequestCallback() {
      return buildCallback(frontendMetrics.getResourceInfoSecurityPostProcessRequestMetrics, securityCheckResult -> {
        if (!isHelixClusterMap) {
          finalCallback.onCompletion(null,
              new RestServiceException("Method is only supported when the cluster map is a helix based cluster map",
                  RestServiceErrorCode.NotAllowed));
        } else {
          Map<String, List<ResourceInfo>> resultObj = new HashMap<>();
          resultObj.put(RESOURCES_KEY, queryResourceInfo());
          byte[] serialized = objectMapper.writeValueAsBytes(resultObj);
          ReadableStreamChannel channel = new ByteBufferReadableStreamChannel(ByteBuffer.wrap(serialized));
          restResponseChannel.setHeader(RestUtils.Headers.DATE, new GregorianCalendar().getTime());
          restResponseChannel.setHeader(RestUtils.Headers.CONTENT_TYPE, RestUtils.JSON_CONTENT_TYPE);
          restResponseChannel.setHeader(RestUtils.Headers.CONTENT_LENGTH, channel.getSize());
          finalCallback.onCompletion(channel, null);
        }
      }, uri, LOGGER, finalCallback);
    }
After {@link SecurityService#postProcessRequest} finishes, call the final callback with the response body to
send the serialized resource info back to client.
@return a {@link Callback} to be used with {@link SecurityService#postProcessRequest}.
ambry-frontend/src/main/java/com/github/ambry/frontend/GetResourceInfoHandler.java