SMSessionCache.java revision 8af80418ba1ec431c8027fa9668e5678658d3611
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * The contents of this file are subject to the terms
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * of the Common Development and Distribution License
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * (the License). You may not use this file except in
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * compliance with the License.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * You can obtain a copy of the License at
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * See the License for the specific language governing
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * permission and limitations under the License.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * When distributing Covered Code, include this CDDL
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * Header Notice in each file and include the License file
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * If applicable, add the following below the CDDL Header,
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * with the fields enclosed by brackets [] replaced by
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * your own identifying information:
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * $Id: SMSessionCache.java,v 1.3 2008/07/10 23:27:24 veiming Exp $
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterimport com.iplanet.dpro.session.SessionException;
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster/* - NEED NOT LOG - */
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * This class caches session information.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster private static Debug debug = SMProfileModelImpl.debug;
3296aadab8464fc555488c34c7ee63644b754387Peter Major * Constructs an instance of <code>SMSessionCache</code>.
3296aadab8464fc555488c34c7ee63644b754387Peter Major * @param sessions Collection of sessions.
3296aadab8464fc555488c34c7ee63644b754387Peter Major * @param searchErrorMsg Search Error Message.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * @param modelImpl Session Profile Implementation class.
3296aadab8464fc555488c34c7ee63644b754387Peter Major Map mapSessions = retainSessionsWithUserID(sessions, modelImpl);
0fab527a2d6151c401775016740db1259ecff42dTony Bamford * Returns search error message.
0fab527a2d6151c401775016740db1259ecff42dTony Bamford * @return search error message.
0fab527a2d6151c401775016740db1259ecff42dTony Bamford * Returns a session information, <code>SMSessionData</code>.
3296aadab8464fc555488c34c7ee63644b754387Peter Major * @return a page of session information, <code>SMSessionData</code>.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster private void cacheSessions(Map mapSessions, SMProfileModelImpl modelImpl) {
3296aadab8464fc555488c34c7ee63644b754387Peter Major List sorted = new ArrayList(mapSessions.keySet());
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster * Returns a map of user ID to session object for session that contains
0fab527a2d6151c401775016740db1259ecff42dTony Bamford for (Iterator iter = sessions.iterator(); iter.hasNext(); ) {
0fab527a2d6151c401775016740db1259ecff42dTony Bamford String userId = sess.getProperty(SMProfileModelImpl.USER_ID);
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster sData.setMaxSessionTime(sess.getMaxSessionTime());
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster debug.warning("SMSessionCache.retainSessionsWithUserID", se);