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 boolean
contains(String key, long timeOut)
Checks whether the cache already contains given key.int
getCachedPasswordsCount()
Get number of cached passwords.static ExternalPasswordCache
getExternalPasswordCacheInstance()
char[]
getPassword(String key)
Get password from the cache.void
reset()
Reset the cache (clean whole cache and start all over again).void
storePassword(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:PasswordCache
Checks whether the cache already contains given key. Non zero timeOut will be checked to expire cache entry.- Specified by:
contains
in interfacePasswordCache
- Returns:
-
getPassword
public char[] getPassword(String key)
Description copied from interface:PasswordCache
Get password from the cache. Returns null if there is no such key in the cache.- Specified by:
getPassword
in interfacePasswordCache
- Returns:
-
storePassword
public void storePassword(String key, char[] password)
Description copied from interface:PasswordCache
Store password to the cache.- Specified by:
storePassword
in interfacePasswordCache
-
getCachedPasswordsCount
public int getCachedPasswordsCount()
Get number of cached passwords. Mainly for testing purpose.
-
reset
public void reset()
Description copied from interface:PasswordCache
Reset the cache (clean whole cache and start all over again).- Specified by:
reset
in interfacePasswordCache
-
-