docs: private Channel reconstructChannel(HFClient client, String channelName, JsonObject jsonChannel, NetworkConfigAddPeerHandler networkConfigAddPeerHandler, NetworkConfigAddOrdererHandler networkConfigAddOrdererHandler) throws NetworkConfigurationException {
  
          Channel channel = null;
  
          try {
              channel = client.newChannel(channelName);
  
              // orderers is an array of orderer name strings
              JsonArray ordererNames = getJsonValueAsArray(jsonChannel.get("orderers"));
  
              //out("Orderer names: " + (ordererNames == null ? "null" : ordererNames.toString()));
              if (ordererNames != null) {
                  for (JsonValue jsonVal : ordererNames) {
  
                      String ordererName = getJsonValueAsString(jsonVal);
  
                      // Orderer orderer = getOrderer(client, ordererName);
                      Node node = orderers.get(ordererName);
                      if (null == node) {
                          throw new NetworkConfigurationException(format("Error constructing channel %s. Orderer %s not defined in configuration", channelName, ordererName));
                      }
  
                      logger.debug(format("Channel %s, adding orderer %s, url: %s", channel.getName(), ordererName, node.url));
                      Properties nodeProps = node.properties;
                      if (null != nodeProps) {
                          nodeProps = (Properties) nodeProps.clone();
                      }
  
                      networkConfigAddOrdererHandler.addOrderer(this, client, channel, ordererName, node.url, nodeProps, node.jsonObject);
                  }
              }
  
              // peers is an object containing a nested object for each peer
              JsonObject jsonPeers = getJsonObject(jsonChannel, "peers");
              boolean foundPeer = false;
  
              //out("Peers: " + (peers == null ? "null" : peers.toString()));
              if (jsonPeers != null) {
  
                  for (Entry<String, JsonValue> entry : jsonPeers.entrySet()) {
                      String peerName = entry.getKey();
  
                      if (logger.isTraceEnabled()) {
                          logger.trace(format("NetworkConfig.reconstructChannel: Processing peer %s", peerName));
                      }
  
                      JsonObject jsonPeer = getJsonValueAsObject(entry.getValue());
                      if (jsonPeer == null) {
                          throw new NetworkConfigurationException(format("Error constructing channel %s. Invalid peer entry: %s", channelName, peerName));
                      }
  
                      Node node = peers.get(peerName);
                      if (node == null) {
                          throw new NetworkConfigurationException(format("Error constructing channel %s. Peer %s not defined in configuration", channelName, peerName));
                      }
  
                      // Set the various roles
                      PeerOptions peerOptions = PeerOptions.createPeerOptions();
  
                      for (PeerRole peerRole : PeerRole.values()) {
                          setPeerRole(channelName, peerOptions, jsonPeer, peerRole);
                      }
  
                      logger.debug(format("Channel %s, adding peer %s, url: %s", channel.getName(), peerName, node.url));
  
                      Properties nodeProps = node.properties;
                      if (null != nodeProps) {
                          nodeProps = (Properties) nodeProps.clone();
                      }
                      networkConfigAddPeerHandler.addPeer(this, client, channel, peerName, node.url, nodeProps, peerOptions, node.jsonObject);
  
                      foundPeer = true;
  
                  }
  
              }
  
              if (!foundPeer) {
                  // peers is a required field
                  throw new NetworkConfigurationException(format("Error constructing channel %s. At least one peer must be specified", channelName));
              }
  
          } catch (InvalidArgumentException e) {
              throw new IllegalArgumentException(e);
          }
  
          return channel;
      }