Package org.jboss.security
Class ExternalPasswordCache
- java.lang.Object
-
- org.jboss.security.ExternalPasswordCache
-
- All Implemented Interfaces:
PasswordCache
public class ExternalPasswordCache extends Object implements PasswordCache
External command password cache. Singleton password cache.- Version:
- $Revision:$
- Author:
- Peter Skopek
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(String key, long timeOut)Checks whether the cache already contains given key.intgetCachedPasswordsCount()Get number of cached passwords.static ExternalPasswordCachegetExternalPasswordCacheInstance()char[]getPassword(String key)Get password from the cache.voidreset()Reset the cache (clean whole cache and start all over again).voidstorePassword(String key, char[] password)Store password to the cache.
-
-
-
Method Detail
-
getExternalPasswordCacheInstance
public static ExternalPasswordCache getExternalPasswordCacheInstance()
-
contains
public boolean contains(String key, long timeOut)
Description copied from interface:PasswordCacheChecks whether the cache already contains given key. Non zero timeOut will be checked to expire cache entry.- Specified by:
containsin interfacePasswordCache- Returns:
-
getPassword
public char[] getPassword(String key)
Description copied from interface:PasswordCacheGet password from the cache. Returns null if there is no such key in the cache.- Specified by:
getPasswordin interfacePasswordCache- Returns:
-
storePassword
public void storePassword(String key, char[] password)
Description copied from interface:PasswordCacheStore password to the cache.- Specified by:
storePasswordin interfacePasswordCache
-
getCachedPasswordsCount
public int getCachedPasswordsCount()
Get number of cached passwords. Mainly for testing purpose.
-
reset
public void reset()
Description copied from interface:PasswordCacheReset the cache (clean whole cache and start all over again).- Specified by:
resetin interfacePasswordCache
-
-