PicketLink Federation Core 2.1.6.Final-redhat-2

org.picketlink.identity.federation.core.sts.registry
Class FileBasedTokenRegistry

java.lang.Object
  extended by org.picketlink.identity.federation.core.sts.registry.FileBasedSTSOperations
      extended by org.picketlink.identity.federation.core.sts.registry.FileBasedTokenRegistry
All Implemented Interfaces:
SecurityTokenRegistry

public class FileBasedTokenRegistry
extends FileBasedSTSOperations
implements SecurityTokenRegistry

A File based implementation of the SecurityTokenRegistry

Since:
Jan 4, 2011
Author:
Anil.Saldhana@redhat.com

Nested Class Summary
protected static class FileBasedTokenRegistry.TokenHolder
           
 
Field Summary
protected static String FILE_NAME
           
protected  Map<String,FileBasedTokenRegistry.TokenHolder> holders
           
protected  File registryFile
           
 
Fields inherited from class org.picketlink.identity.federation.core.sts.registry.FileBasedSTSOperations
directory, logger
 
Constructor Summary
FileBasedTokenRegistry()
           
FileBasedTokenRegistry(String fileName)
           
 
Method Summary
 void addToken(String tokenID, Object token)
          Add a token to the registry with the given id
protected  void flush()
           
 Object getToken(String tokenID)
          Given the id, return a token
protected  void read()
           
 void removeToken(String tokenID)
          Remove a token given the ID
 
Methods inherited from class org.picketlink.identity.federation.core.sts.registry.FileBasedSTSOperations
create
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_NAME

protected static final String FILE_NAME
See Also:
Constant Field Values

registryFile

protected File registryFile

holders

protected Map<String,FileBasedTokenRegistry.TokenHolder> holders
Constructor Detail

FileBasedTokenRegistry

public FileBasedTokenRegistry()

FileBasedTokenRegistry

public FileBasedTokenRegistry(String fileName)
Method Detail

addToken

public void addToken(String tokenID,
                     Object token)
              throws IOException
Description copied from interface: SecurityTokenRegistry
Add a token to the registry with the given id

Specified by:
addToken in interface SecurityTokenRegistry
Throws:
IOException
See Also:
SecurityTokenRegistry.addToken(java.lang.String, java.lang.Object)

removeToken

public void removeToken(String tokenID)
                 throws IOException
Description copied from interface: SecurityTokenRegistry
Remove a token given the ID

Specified by:
removeToken in interface SecurityTokenRegistry
Throws:
IOException
See Also:
SecurityTokenRegistry.removeToken(java.lang.String)

getToken

public Object getToken(String tokenID)
Description copied from interface: SecurityTokenRegistry
Given the id, return a token

Specified by:
getToken in interface SecurityTokenRegistry
Returns:
See Also:
SecurityTokenRegistry.getToken(java.lang.String)

flush

protected void flush()
              throws IOException
Throws:
IOException

read

protected void read()
             throws IOException
Throws:
IOException

PicketLink Federation Core 2.1.6.Final-redhat-2

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.