/**
   * Called when the session posts the notification "SessionDidCreateNotification". Note, since this
   * notification reports EVERY session creation, we need to check that the one we react to is our
   * own.
   *
   * <p>This method calls subclasses' {@link #didCreateSession} method.
   *
   * @param n - the Session instance.
   */
  public final void sessionWillAwake(NSNotification n) {
    if (((WOSession) n.object()).sessionID().equals(sessionID())) {
      logger.trace(
          "!-- "
              + ERXSession.SessionWillAwakeNotification
              + " ["
              + ((WOSession) n.object()).sessionID()
              + "]");

      if (null == this.sessionInfo) {
        this.sessionInfo = new NSMutableDictionary<String, Object>();
        this.sessionInfo.takeValueForKey(0, "HitCount");
        SessionInfoDict.add_SessionInfo(sessionID(), this.sessionInfo);
      }

      sessionWillAwake();
      this.application.addSession(this, sessionID());
    }
  }