001/** 002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 003 * 004 * Copyright (c) 2011 ForgeRock AS. All Rights Reserved 005 * 006 * The contents of this file are subject to the terms 007 * of the Common Development and Distribution License 008 * (the License). You may not use this file except in 009 * compliance with the License. 010 * 011 * You can obtain a copy of the License at 012 * http://forgerock.org/license/CDDLv1.0.html 013 * See the License for the specific language governing 014 * permission and limitations under the License. 015 * 016 * When distributing Covered Code, include this CDDL 017 * Header Notice in each file and include the License file 018 * at http://forgerock.org/license/CDDLv1.0.html 019 * If applicable, add the following below the CDDL Header, 020 * with the fields enclosed by brackets [] replaced by 021 * your own identifying information: 022 * "Portions Copyrighted [year] [name of copyright owner]" 023 * 024 */ 025package org.forgerock.openam.session.service; 026 027import com.iplanet.sso.SSOToken; 028 029/** 030 * Implementation of this class gets executed every time when an SSO Session 031 * times out (either idle or max timeout). A new instance of the timeout handler 032 * is created upon session timeout. The listed methods are called just before 033 * the session gets removed, so it is safe to use the passed in {@link SSOToken} 034 * instances. Because of this behavior it is encouraged that implementations 035 * don't run lengthy operations. 036 * 037 * @author Peter Major 038 * @supported.all.api 039 */ 040public interface SessionTimeoutHandler { 041 042 /** 043 * Executed on idle timeout 044 * 045 * @param token The {@link SSOToken} instance for the timed out session 046 */ 047 public void onIdleTimeout(SSOToken token); 048 049 /** 050 * Executed on max timeout 051 * 052 * @param token The {@link SSOToken} instance for the timed out session 053 */ 054 public void onMaxTimeout(SSOToken token); 055}