class HostComponentProcessResourceProvider extends ReadOnlyResourceProvider {

  @Override
  public Set<Resource> getResources(Request request, Predicate predicate)
      throws SystemException, UnsupportedPropertyException,
             NoSuchResourceException, NoSuchParentResourceException {

    final Set<Map<String, Object>> requestMaps = getPropertyMaps(predicate);

    Set<String> requestedIds = getRequestPropertyIds(request, predicate);

    Set<HostComponentProcessResponse> responses = getResources(new Command<Set<HostComponentProcessResponse>>() {
      @Override
      public Set<HostComponentProcessResponse> invoke() throws AmbariException {
        return getHostComponentProcesses(requestMaps);
      }
    });
    
    Set<Resource> resources = new HashSet<>();
    
    for (HostComponentProcessResponse response : responses) {
      Resource r = new ResourceImpl(Resource.Type.HostComponentProcess);
      
      setResourceProperty(r, CLUSTER_NAME, response.getCluster(),
          requestedIds);
      setResourceProperty(r, HOST_NAME, response.getHost(),
          requestedIds);
      setResourceProperty(r, COMPONENT_NAME, response.getComponent(), requestedIds);
      
      setResourceProperty(r, NAME, response.getValueMap().get("name"),
          requestedIds);
      setResourceProperty(r, STATUS, response.getValueMap().get("status"),
          requestedIds);
      
      // set the following even if they aren't defined
      for (Entry<String, String> entry : response.getValueMap().entrySet()) {
        // these are already set
        if (entry.getKey().equals("name") || entry.getKey().equals("status"))
          continue;
        
        setResourceProperty(r, "HostComponentProcess/" + entry.getKey(),
            entry.getValue(), requestedIds);
          
      }

      resources.add(r);
    }

    return resources;
  }

    HostComponentProcessResourceProvider(AmbariManagementController amc);

}