public ComponentInfo getClientComponent() {
    ComponentInfo client = null;

    if (components != null) {
      for (ComponentInfo compInfo : components) {
        if (compInfo.isClient()) {
          client = compInfo;
          break;
        }
      }
    }
    return client;
  }
Finds ComponentInfo by component name

@param componentName name of the component
@return ComponentInfo componentName or null
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java