public static void assignPaas(List<Client> clientList, List<Paas> paasList) {
    
    List<PaasHandler> paasHandlerList = new ArrayList<>();
    logger.info("localPass");
    for (Paas paas : paasList) {
      logger.info("paas = " + paas);
      PaasHandler paasHandler = paas.makePaasHandler(pathToDB);
      if (paasHandler != null)
        paasHandlerList.add(paasHandler);
    }
    
    if (paasHandlerList.size() <= 0) {
      logger.info("All Paas are appeared to be local");
      CircularLinkedList<Paas> localPass = new CircularLinkedList(paasList);
      logger.info("localPass");
      for (Paas p:localPass) {
        logger.info("p = " + p);
      }
      for (Client client : clientList) {
        if (client.getPaas() == null) {
          if (localPass.size() > 0) {
            client.setPaas(localPass.get());
          } else {
            logger.error("localPass list is null");
            throw new NullPointerException();
          }
        }
      }
    } else {
      PaasManager paasManager = new PaasManager(paasHandlerList);
      paasManager.communicateWithRemotes();
      
      for (Client client : clientList) {
        if (client.getPaas() == null) {
          Paas paas = paasManager.findAppropriatePaas(client);
          if (paas != null) {
            client.setPaas(paas);
          }
        }
      }
    }
    logger.info("client.getPaas()");
    for (Client client : clientList) {
      logger.info("client.getPass= " + client.getPaas());
    }
  }
Assign paas.

@param clientList the client list
@param paasList   the paas list
KITE-Framework/src/main/java/org/webrtc/kite/config/paas/PaasManager.java