001/** 002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 003 * 004 * Copyright (c) 2005 Sun Microsystems Inc. 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 * https://opensso.dev.java.net/public/CDDLv1.0.html or 013 * opensso/legal/CDDLv1.0.txt 014 * See the License for the specific language governing 015 * permission and limitations under the License. 016 * 017 * When distributing Covered Code, include this CDDL 018 * Header Notice in each file and include the License file 019 * at opensso/legal/CDDLv1.0.txt. 020 * If applicable, add the following below the CDDL Header, 021 * with the fields enclosed by brackets [] replaced by 022 * your own identifying information: 023 * "Portions Copyrighted [year] [name of copyright owner]" 024 * 025 * $Id: SSOTokenEvent.java,v 1.4 2008/08/15 01:05:20 veiming Exp $ 026 * 027 */ 028 029package com.iplanet.sso; 030 031/** 032 * The <code>SSOTokenEvent</code> is an interface that represents an SSO token 033 * event.The single sign on token event represents a change in 034 * <code>SSOToken</code>. 035 * </p> 036 * The following are possible SSO token event types: 037 * <ul> 038 * <li><code>SSO_TOKEN_IDLE_TIMEOUT</code>, 039 * <li><code>SSO_TOKEN_MAX_TIMEOUT</code> and 040 * <li><code>SSO_TOKEN_DESTROY</code> 041 * <li><code>SSO_TOKEN_PROPERTY_CHANGED</code> 042 * </ul> 043 * 044 * @supported.all.api 045 */ 046public interface SSOTokenEvent { 047 /** 048 * SSO Token idle timeout event. 049 */ 050 int SSO_TOKEN_IDLE_TIMEOUT = 1; 051 052 /** 053 * SSO Token maximum time out event. 054 */ 055 int SSO_TOKEN_MAX_TIMEOUT = 2; 056 057 /** 058 * SSO Token destroy event. 059 */ 060 int SSO_TOKEN_DESTROY = 3; 061 062 /** 063 * SSO Token property changed event. 064 */ 065 int SSO_TOKEN_PROPERTY_CHANGED = 4; 066 067 /** 068 * Returns the <code>SSOToken</code> associated with the SSO Token event. 069 * 070 * @return <code>SSOToken</code> 071 */ 072 SSOToken getToken(); 073 074 /** 075 * Returns the time of this event. 076 * 077 * @return The event time as <code>UTC</code> milliseconds from the epoch. 078 */ 079 long getTime(); 080 081 /** 082 * Returns the type of this event. 083 * 084 * @return The type of this event. Possible types are : 085 * <ul> 086 * <li><code>SSO_TOKEN_IDLE_TIMEOUT</code></li> 087 * <li><code>SSO_TOKEN_MAX_TIMEOUT</code></li> 088 * <li><code>SSO_TOKEN_DESTROY</code></li> and 089 * <li><code>SSO_TOKEN_PROPERTY_CHANGED</code></li> 090 * </ul> 091 * @throws SSOException if the <code>SSOTokenEvent</code> type is 092 * not one of the above. 093 */ 094 int getType() throws SSOException; 095}