com.atlassian.bamboo.rest
Class SessionTokenMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by com.atlassian.bamboo.rest.SessionTokenMap
All Implemented Interfaces:
java.io.Serializable, 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

SessionTokenMap

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

Parameters:
tokenTimeout - max time in the map
Method Detail

put

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
Overrides:
put in class java.util.HashMap
Parameters:
key - The key to identify the object
value - The value we are placing in the map
Returns:
The value

get

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

containsValue

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


Copyright © 2010 Atlassian. All Rights Reserved.