private void handleJoined(InternalDistributedMember id) {
    if (!isListening()) {
      return;
    }

    // set current join and begin handling of it...
    currentJoin = id;
    try {
      GemFireVM member = null;
      switch (id.getVmKind()) {
        case ClusterDistributionManager.NORMAL_DM_TYPE:
          member = addMember(id);
          break;
        case ClusterDistributionManager.LOCATOR_DM_TYPE:
          break;
        case ClusterDistributionManager.ADMIN_ONLY_DM_TYPE:
          break;
        case ClusterDistributionManager.LONER_DM_TYPE:
          break; // should this ever happen? :-)
        default:
          throw new IllegalArgumentException(String.format("Unknown VM Kind: %s", id.getVmKind()));
      }

      // if we have a valid member process it...
      if (abortCurrentJoin) {
        return;
      }
      if (member != null) {
        if (abortCurrentJoin) {
          return;
        }
        for (JoinLeaveListener listener : listeners) {
          if (abortCurrentJoin) {
            return;
          }
          try {
            listener.nodeJoined(this, member);
          } catch (VirtualMachineError e) {
            SystemFailure.initiateFailure(e);
            throw e;
          } catch (Throwable e) {
            SystemFailure.checkFailure();
            logger.warn("Listener threw an exception.", e);
          }
        }
      }

    } finally {
      // finished this join so remove it...
      removePendingJoins(id);

      // clean up current join and abort flag...
      if (abortCurrentJoin) {
        logger.info("aborted  {}", id);
      }
      currentJoin = null;
      abortCurrentJoin = false;
    }
  }
Handles a membership join asynchronously from the memberJoined notification. Sets and clears
current join. Also makes several checks to support aborting of the current join.
geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteGfManagerAgent.java