krb5.client.ccache
Class HashtableCacheImpl

java.lang.Object
  extended by krb5.client.ccache.HashtableCacheImpl
All Implemented Interfaces:
CredCacheInterface

public class HashtableCacheImpl
extends java.lang.Object
implements CredCacheInterface

Class Description : Credential cache implementation by hashtable data structure.

Version:
1.1
Author:
Bojan Pajkovski

Constructor Summary
HashtableCacheImpl()
          Class constructor
 
Method Summary
 void addInitialCredentials(Credentials creds)
          Add initial credentials into cache
 void addServiceCredentials(Credentials creds)
          Add service credentials into cache
 boolean destroyInitialCredentials()
          Remove initial credentials from cache
 boolean destroyServiceCredentials(java.lang.String principalName)
          Remove service credentials from cache
 Credentials[] getAllCredentials()
          Return all credentials in cache
 Credentials getInitialCredentials()
          Retrieve initial credentials from cache
 Credentials getServiceCredentials(java.lang.String principalName)
          Retrieve service credentials from cache
 boolean restore(java.lang.String fileName)
          Reload credentials from cache.log file
 boolean store(java.lang.String fileName)
          Store cache contants into cache.log file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashtableCacheImpl

public HashtableCacheImpl()
Class constructor

Method Detail

addInitialCredentials

public void addInitialCredentials(Credentials creds)
Add initial credentials into cache

Specified by:
addInitialCredentials in interface CredCacheInterface
Parameters:
creds - Credentials

addServiceCredentials

public void addServiceCredentials(Credentials creds)
Add service credentials into cache

Specified by:
addServiceCredentials in interface CredCacheInterface
Parameters:
creds - Credentials

getInitialCredentials

public Credentials getInitialCredentials()
Retrieve initial credentials from cache

Specified by:
getInitialCredentials in interface CredCacheInterface
Returns:
Credentials

getServiceCredentials

public Credentials getServiceCredentials(java.lang.String principalName)
Retrieve service credentials from cache

Specified by:
getServiceCredentials in interface CredCacheInterface
Parameters:
principalName - String
Returns:
Credentials

destroyInitialCredentials

public boolean destroyInitialCredentials()
Remove initial credentials from cache

Specified by:
destroyInitialCredentials in interface CredCacheInterface
Returns:
boolean

destroyServiceCredentials

public boolean destroyServiceCredentials(java.lang.String principalName)
Remove service credentials from cache

Specified by:
destroyServiceCredentials in interface CredCacheInterface
Parameters:
principalName - String
Returns:
boolean

getAllCredentials

public Credentials[] getAllCredentials()
Return all credentials in cache

Specified by:
getAllCredentials in interface CredCacheInterface
Returns:
Credentials[]

store

public boolean store(java.lang.String fileName)
Store cache contants into cache.log file

Specified by:
store in interface CredCacheInterface
Parameters:
fileName - String
Returns:
boolean

restore

public boolean restore(java.lang.String fileName)
Reload credentials from cache.log file

Specified by:
restore in interface CredCacheInterface
Parameters:
fileName - String
Returns:
boolean