docs: private CFEndPoint[] commonGetEndPoints(CFEndPoint[] endPointList, CFEndPointCriteria criteria, boolean getBestOnly) {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, "commonGetEndPoints");
          }
          if (null == endPointList || 0 == endPointList.length || null == criteria) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
                  Tr.exit(tc, "commonGetEndPoints", null);
              }
              return null;
          }
          String chainName = criteria.getChainName();
          List<CFEndPoint> chosenEndPoints = new LinkedList<CFEndPoint>();
          if (null != chainName) {
              for (int i = 0; i < endPointList.length; i++) {
                  if (null == endPointList[i]) {
                      continue;
                  }
                  if (chainName.equals(endPointList[i].getName())) {
                      chosenEndPoints.add(endPointList[i]);
                      if (getBestOnly) {
                          break;
                      }
                  }
              }
          } else {
              // Chain name was not provided in criteria.
              // Take special steps if the vhost is specified in the criteria.
              String vhost = criteria.getVirtualHost();
              if (null != vhost) {
                  // If a match is found with an endpoint, then chosenEndPoints should
                  // only include
                  // a list of endPoints with matching vhost. If no matches are found,
                  // then filter
                  // out all endPoints that have the unmatching vhost ... leaving all with
                  // null vhosts.
                  //
                  // Special Note:
                  // The case of not finding a match should only happen if no vhost was
                  // found to match
                  // the inbound chain's host and port that lead to the creation of the
                  // CFEndPoint. This
                  // could result from a customer changing the port number on the server,
                  // but not
                  // putting the port into an appropriate virtual host. If precise
                  // selection of a
                  // CFEndPoint is needed, then that extra step is required by the
                  // customer.
                  List<CFEndPoint> vhostMatchingEndPoints = new ArrayList<CFEndPoint>();
                  List<CFEndPoint> vhostNullEndPoints = new ArrayList<CFEndPoint>();
                  for (CFEndPoint tempEndPoint : endPointList) {
                      if (tempEndPoint == null) {
                          continue;
                      }
                      List<String> vhostList = tempEndPoint.getVirtualHosts();
                      if (vhostList.isEmpty()) {
                          vhostNullEndPoints.add(tempEndPoint);
                      } else {
                          for (String value : vhostList) {
                              if (vhost.equalsIgnoreCase(value)) {
                                  // Found a match. Add it to the matching array list.
                                  vhostMatchingEndPoints.add(tempEndPoint);
                                  break;
                              }
                          }
                      }
                  }
                  // Check to see if any matches were found for the vhost.
                  if (0 != vhostMatchingEndPoints.size()) {
                      // A match was found. The endPointList should only include these
                      // endPoints.
                      // Update the array to the correct length. Then fill it with the new
                      // contents.
                      endPointList = new CFEndPoint[vhostMatchingEndPoints.size()];
                      vhostMatchingEndPoints.toArray(endPointList);
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "Found matching vhost in " + vhostMatchingEndPoints.size() + " CFEndPoints.");
                      }
                  } else {
                      // No match was found. The endPointList should only include endPoints
                      // with no vhost.
                      // Update the array to the correct length. Then fill it with the new
                      // contents.
                      endPointList = new CFEndPoint[vhostNullEndPoints.size()];
                      vhostNullEndPoints.toArray(endPointList);
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "No matching vhost found.  New CFEndPoint list size " + vhostNullEndPoints.size());
                      }
                  }
              }
  
              // Decision may be based on isSSLRequired and isLocal
              boolean sslRequired = criteria.isSSLRequired();
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "Criteria specification if SSL is required: " + sslRequired);
              }
  
              // Decision may be based on a list of required channel factories.
              Class<?>[] requiredFactories = criteria.getOptionalChannelFactories();
  
              // Iterate the endPoints and compare them to the criteria.
              for (CFEndPoint tempEndPoint : endPointList) {
                  if (tempEndPoint == null) {
                      continue;
                  }
                  // Double check that the channel accessor is not null.
                  if (tempEndPoint.getChannelAccessor() == null) {
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "Skipping over end point with null channel accessor, " + tempEndPoint.getName());
                      }
                      continue;
                  }
  
                  // Check for inclusion of the required factories.
                  if (requiredFactories != null) {
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "Found required factories to match");
                      }
                      boolean foundFactory = true;
                      Class<?> ocdFactory = null;
                      List<OutboundChannelDefinition> ocdList = tempEndPoint.getOutboundChannelDefs();
                      // Iterate the list of required factories to ensure each is in the end
                      // point.
                      for (Class<?> requiredFactory : requiredFactories) {
                          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                              Tr.debug(tc, "RequiredFactory: " + requiredFactory);
                          }
                          // Note that we haven't found a match yet.
                          foundFactory = false;
                          // Iterate the list of outbound channel definitions in search for
                          // the required factory class.
                          for (OutboundChannelDefinition def : ocdList) {
                              ocdFactory = def.getOutboundFactory();
                              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                                  Tr.debug(tc, "OCD Factory: " + ocdFactory);
                              }
                              // Try to match the required factory class to this outbound
                              // channel definition.
                              if (requiredFactory.isAssignableFrom(ocdFactory) || ocdFactory.isAssignableFrom(requiredFactory)) {
                                  // Found a match. This endpoint is good so far.
                                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                                      Tr.debug(tc, "Found a match");
                                  }
                                  foundFactory = true;
                                  break;
                              }
                          }
                          // Verify that the required factory was in the endpoint.
                          if (!foundFactory) {
                              // Did NOT find a match. This endpoint is no good. Break out of
                              // this loop.
                              break;
                          }
                      }
                      if (!foundFactory) {
                          // Did NOT find a match for a required factory. This endpoint is no
                          // good. Move on to next endpoint.
                          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                              Tr.debug(tc, "Skipping over endpoint with missing required factory.");
                          }
                          continue;
                      }
                  }
  
                  // Check that the channel accessor matches the endPoint.
                  if (tempEndPoint.getChannelAccessor().equals(criteria.getChannelAccessor())) {
                      // Found matching channel accessor. Check if SSL is required in the
                      // criteria
                      if (sslRequired) {
                          // The criteria requires an SSL enabled endpoint.
                          if (tempEndPoint.isSSLEnabled()) {
                              // Check to see if an endpoint was already found.
                              if (chosenEndPoints.size() == 0) {
                                  // No endpoint found yet. Found a matching endpoint.
                                  chosenEndPoints.add(tempEndPoint);
                                  // Searching can stop if the endpoint is local
                                  if (tempEndPoint.isLocal()) {
                                      // The matching endpoint is local and getBestOnly. Stop
                                      // search.
                                      if (getBestOnly) {
                                          break;
                                      }
                                  }
                              } else {
                                  if (getBestOnly) {
                                      // Endpoint was already found. We are searching for a better
                                      // local one.
                                      if (tempEndPoint.isLocal()) {
                                          // This endpoint is local and the former endPoint wasn't and
                                          // getBestOnly. Stop search.
                                          chosenEndPoints.add(tempEndPoint);
                                          break;
                                      }
                                  } else {
                                      chosenEndPoints.add(tempEndPoint);
                                  }
                              }
                          }
                      } else {
                          // The criteria requires a non SSL enabled endpoint.
                          if (!tempEndPoint.isSSLEnabled()) {
                              // Found a matching non SSL enabled endpoint.
                              chosenEndPoints.add(tempEndPoint);
                              // Still need to get a local one if available.
                              if (tempEndPoint.isLocal()) {
                                  // Found a matching local endpoint. Stop search.
                                  if (getBestOnly) {
                                      break;
                                  }
                              }
                          }
                      } // end check sslRequired
                  } // end check channelAccessor
              } // end loop through end points
          } // end check chainName
  
          // convert the list to array or null if no match is found.
          int rtnSize = chosenEndPoints.size();
          CFEndPoint rtnEPs[] = null;
          if (rtnSize > 0) {
              rtnEPs = new CFEndPoint[rtnSize];
              chosenEndPoints.toArray(rtnEPs);
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, "commonGetEndPoints " + rtnSize);
          }
          return rtnEPs;
      }