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:
Serializable, Cloneable, Map

public class SessionTokenMap
extends HashMap

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

See Also:
Serialized Form

Constructor Summary
SessionTokenMap(long tokenTimeout)
          How long should values remain in the map before they timeout?
 
Method Summary
 boolean containsValue(Object o)
           
 Object get(Object key)
           
 Object put(Object key, 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 Object put(Object key,
                  Object value)
Place the value in the map until it's removed for timesout

Specified by:
put in interface Map
Overrides:
put in class HashMap
Parameters:
key - The key to identify the object
value - The value we are placing in the map
Returns:
The value

get

public Object get(Object key)
Specified by:
get in interface Map
Overrides:
get in class HashMap

containsValue

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


Copyright © 2006 Atlassian Software Systems. All Rights Reserved.