private boolean handleAuthenticationExpiredException(AuthenticationExpiredException expired)
      throws InterruptedException {
    if (unregisterUnsupportedClient(expired)) {
      return true;
    }

    long reAuthenticateWaitTime =
        getSystemProperty(RE_AUTHENTICATE_WAIT_TIME, DEFAULT_RE_AUTHENTICATE_WAIT_TIME);
    synchronized (reAuthenticationLock) {
      // turn on the "isWaitingForReAuthentication" flag before we send the re-auth message
      // if we do it the other way around, the re-auth might be finished before we turn on the
      // flag for the notification to happen.
      waitForReAuthenticationStartTime = System.currentTimeMillis();
      subjectUpdated = false;
      EventID eventId = createEventId();
      sendMessageDirectly(new ClientReAuthenticateMessage(eventId));

      long waitFinishTime = waitForReAuthenticationStartTime + reAuthenticateWaitTime;
      long remainingWaitTime = waitFinishTime - System.currentTimeMillis();
      while (!subjectUpdated && remainingWaitTime > 0) {
        reAuthenticationLock.wait(remainingWaitTime);
        remainingWaitTime = waitFinishTime - System.currentTimeMillis();
      }
    }
    // the above wait timed out
    if (!subjectUpdated) {
      long elapsedTime = System.currentTimeMillis() - waitForReAuthenticationStartTime;
      // reset the timer here since we are no longer waiting for re-auth to happen anymore
      waitForReAuthenticationStartTime = -1;
      synchronized (_stopDispatchingLock) {
        logger.warn(
            "Client did not re-authenticate back successfully in {} ms. Unregister this client proxy.",
            elapsedTime);
        pauseOrUnregisterProxy(expired);
      }
      return true;
    }
    return false;
  }
Runs the dispatcher by taking a message from the queue and sending it to the client attached
to this proxy.
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageDispatcher.java