uk.ac.soton.itinnovation.grid.comms.client
Interface TokenCache

All Known Implementing Classes:
SAMLTokenCache

public interface TokenCache


Method Summary
 void addToken(String urlReference, Element token)
          Add a token to the cache.
 void clear()
          Remove all entries form the cache.
 Map getMap()
          Return the Map from URL reference to token.
 Element getToken(String urlReference, Identity identity)
          Get a token from the cache.
 void removeToken(String urlReference)
          Remove a token from the cache.
 

Method Detail

clear

void clear()
Remove all entries form the cache.


addToken

void addToken(String urlReference,
              Element token)
Add a token to the cache.

Parameters:
urlReference - the key (e.g. http://example.com/service#1234-abc)
token - the token

getToken

Element getToken(String urlReference,
                 Identity identity)
Get a token from the cache. The cache will only return valid tokens.

Parameters:
urlReference - a unique identifier for the source of the token
identity - the subject of the token
Returns:
the valid token or null

removeToken

void removeToken(String urlReference)
Remove a token from the cache. Silent if token not in cache.

Parameters:
urlReference - the key (e.g. http://example.com/service#1234-abc)

getMap

Map getMap()
Return the Map from URL reference to token.



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