01: /**
02: * $Id: CompressorReaper.java,v 1.1 2003/03/01 02:01:27 saare Exp $
03: * Copyright 2003 Sun Microsystems, Inc. All
04: * rights reserved. Use of this product is subject
05: * to license terms. Federal Acquisitions:
06: * Commercial Software -- Government Users
07: * Subject to Standard License Terms and
08: * Conditions.
09: *
10: * Sun, Sun Microsystems, the Sun logo, and iPlanet
11: * are trademarks or registered trademarks of Sun Microsystems,
12: * Inc. in the United States and other countries.
13: */package com.sun.portal.wireless.taglibs.dispatcher;
14:
15: import java.util.*;
16:
17: import com.iplanet.sso.*;
18:
19: public class CompressorReaper implements SSOTokenListener {
20:
21: private String key;
22: private HashMap hashMap;
23:
24: CompressorReaper(String key, HashMap hashMap) {
25: this .key = key;
26: this .hashMap = hashMap;
27: }
28:
29: /**
30: * Implements SSOTokenListener "ssoTokenChanged" method.
31: */
32: public void ssoTokenChanged(com.iplanet.sso.SSOTokenEvent evt) {
33: try {
34: int evtType = evt.getType();
35:
36: if (evtType != evt.SSO_TOKEN_DESTROY
37: && evtType != evt.SSO_TOKEN_IDLE_TIMEOUT
38: && evtType != evt.SSO_TOKEN_MAX_TIMEOUT) {
39: return;
40: }
41:
42: synchronized (hashMap) {
43: hashMap.remove(key);
44: }
45:
46: } catch (Exception e) {
47: }
48: }
49:
50: }
|