uk.ac.soton.itinnovation.grid.comms.client
Class SAMLTokenCache

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.comms.client.SAMLTokenCache
All Implemented Interfaces:
TokenCache

public class SAMLTokenCache
extends Object
implements TokenCache

SAMLTokenCache.java


Constructor Summary
SAMLTokenCache()
           
 
Method Summary
 void addToken(String urlRef, Element token)
          Add a token to the cache.
 void clear()
          Remove all entries form the cache.
 HashMap getMap()
          Return the Map from URL reference to token.
 Element getToken(String urlReference, Identity identity)
          Get a token from the cache.
 void removeToken(String urlRef)
          Remove a token from the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAMLTokenCache

public SAMLTokenCache()
Method Detail

addToken

public void addToken(String urlRef,
                     Element token)
Description copied from interface: TokenCache
Add a token to the cache.

Specified by:
addToken in interface TokenCache
Parameters:
urlRef - the key (e.g. http://example.com/service#1234-abc)
token - the token

getToken

public Element getToken(String urlReference,
                        Identity identity)
Description copied from interface: TokenCache
Get a token from the cache. The cache will only return valid tokens.

Specified by:
getToken in interface TokenCache
Parameters:
urlReference - a unique identifier for the source of the token
identity - the subject of the token
Returns:
the valid token or null

removeToken

public void removeToken(String urlRef)
Description copied from interface: TokenCache
Remove a token from the cache. Silent if token not in cache.

Specified by:
removeToken in interface TokenCache
Parameters:
urlRef - the key (e.g. http://example.com/service#1234-abc)

clear

public void clear()
Description copied from interface: TokenCache
Remove all entries form the cache.

Specified by:
clear in interface TokenCache

getMap

public HashMap getMap()
Description copied from interface: TokenCache
Return the Map from URL reference to token.

Specified by:
getMap in interface TokenCache


Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.