private List<ResourceInfo> queryResourceInfo() throws RestServiceException {
      String partitionName = RestUtils.getHeader(restRequest.getArgs(), RestUtils.Headers.PARTITION, false);
      String hostname = RestUtils.getHeader(restRequest.getArgs(), RestUtils.Headers.HOSTNAME, false);
      String resourceName = RestUtils.getHeader(restRequest.getArgs(), RestUtils.Headers.RESOURCE, false);
      HelixClusterManager.ResourceIdentifier resourceIdentifier;
      if (partitionName != null) {
        resourceIdentifier = new HelixClusterManager.PartitionIdIdentifier(partitionName);
      } else if (hostname != null) {
        resourceIdentifier = new HelixClusterManager.HostnameIdentifier(hostname);
      } else if (resourceName != null) {
        resourceIdentifier = new HelixClusterManager.ResourceNameIdentifier(resourceName);
      } else {
        resourceIdentifier = new HelixClusterManager.AllResourceIdentifier();
      }
      try {
        return ((HelixClusterManager) clustermap).queryResourceInfos(resourceIdentifier);
      } catch (IllegalArgumentException e) {
        throw new RestServiceException(e.getMessage(), e, RestServiceErrorCode.BadRequest);
      } catch (Exception e) {
        throw new RestServiceException(e.getMessage(), e, RestServiceErrorCode.InternalServerError);
      }
    }
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