Class SessionTokenMap

  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by
All Implemented Interfaces:, java.lang.Cloneable, java.util.Map

public class SessionTokenMap
extends java.util.HashMap

Provides a timeout on the put/get of sessions strings. Used to implement session timeouts.

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
Constructor Summary
SessionTokenMap(long tokenTimeout)
          How long should values remain in the map before they timeout?
Method Summary
 boolean containsValue(java.lang.Object o)
 java.lang.Object get(java.lang.Object key)
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          Place the value in the map until it's removed for timesout
Methods inherited from class java.util.HashMap
clear, clone, containsKey, entrySet, isEmpty, keySet, putAll, remove, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
equals, hashCode

Constructor Detail


public SessionTokenMap(long tokenTimeout)
How long should values remain in the map before they timeout?

tokenTimeout - max time in the map
Method Detail


public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Place the value in the map until it's removed for timesout

Specified by:
put in interface java.util.Map
put in class java.util.HashMap
key - The key to identify the object
value - The value we are placing in the map
The value


public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map
get in class java.util.HashMap


public boolean containsValue(java.lang.Object o)
Specified by:
containsValue in interface java.util.Map
containsValue in class java.util.HashMap

Copyright © 2011 Atlassian. All Rights Reserved.