code: public PushProcessorPipeline build(List<PushProcessorSupplier> processor_suppliers) throws Exception {
          ApiServer api = null;
          PushMetricRegistryInstance registry = null;
          final List<PushProcessor> processors = new ArrayList<>(processor_suppliers.size());
          try {
              final EndpointRegistration epr;
              if (epr_ == null)
                  epr = api = new ApiServer(api_sockaddr_);
              else
                  epr = epr_;
  
              registry = cfg_.create(PushMetricRegistryInstance::new, epr);
              for (PushProcessorSupplier pps : processor_suppliers)
                  processors.add(pps.build(epr));
  
              if (history_ != null)
                  registry.setHistory(history_);
              if (api != null) api.start();
              return new PushProcessorPipeline(registry, collect_interval_seconds_, processors);
          } catch (Exception ex) {
              try {
                  if (api != null) api.close();
              } catch (Exception ex1) {
                  ex.addSuppressed(ex1);
              }
  
              try {
                  if (registry != null) registry.close();
              } catch (Exception ex1) {
                  ex.addSuppressed(ex1);
              }
  
              for (PushProcessor pp : processors) {
                  try {
                      pp.close();
                  } catch (Exception ex1) {
                      ex.addSuppressed(ex1);
                  }
              }
  
              throw ex;
          }
      }
docs: Creates a push processor.
  
  The API server is started by this method.
  The returned push processor is not started.
  @param processor_suppliers A list of PushProcessorSupplier, that will instantiate the push processors.
  @return A Push Processor pipeline.  You'll need to start it yourself.
  @throws Exception indicating construction failed.
  Push Processors that were created before the exception was thrown, will be closed.