/**
   * Method removeEntry removes SASL/Authenticator data from the SASLSession table. Called when
   * sessions terminate, or when credentials are 'cleared'.
   */
  protected synchronized void removeEntry(Session session) throws SASLException {
    if (session == null) throw new SASLException(ERR_INVALID_PARAMETERS);

    if (session.getPeerCredential() != null) {
      String authenticator = session.getPeerCredential().getAuthenticator();
      if (authenticator == null) throw new SASLException(ERR_INVALID_PARAMETERS);
      nameToSession.remove(authenticator);
    }
    sessionToName.remove(session);
    session.removeSessionListener(this);
    printContents();
  }