@Override public void terminate() { logger.trace("-->--> terminate() [id=" + sessionID() + "]"); this.application.delSession(sessionID()); SessionInfoDict.log_SessionInfo(); SessionInfoDict.sub_SessionInfo(sessionID()); super.terminate(); }
@Override public void awake() { super.awake(); if (!SessionInfoDict.any_SessionInfo(sessionID())) { logger.error( " | unknown sessionID :" + sessionID() + ". We are terminating this session."); terminate(); } }
/** * 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()); } }