public class JCEKSPasswordAliasStore extends Object implements org.glassfish.api.admin.PasswordAliasStore
The keystore is actually managed by the PasswordAdapter, to which this implementation currently delegates its work.
Note that this service is currently per-lookup. This is so that each use of the alias store gets the current on-disk information. Ideally we can change this when we can use Java 7 features, including the WatchService feature.
This class's methods are not synchronized because the PasswordAdapter's methods are. If this implementation changes so that it no longer delegates to those synchronized PasswordAdapter methods, then make sure that the implementation is thread-safe.
Note that the domain-scoped password alias store service class extends this class. As a service, that class will be instantiated using the no-args constructor. So the actual initialization of the class occurs in the init method. The domain-scoped service class invokes the init method itself. Any code that needs to create some other alias store can use the newInstance method to provide the location of the alias store file and the password.
| Constructor and Description |
|---|
JCEKSPasswordAliasStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(String alias) |
char[] |
get(String alias) |
protected void |
init(String pathToAliasStore,
char[] storePassword) |
boolean |
isEmpty() |
Iterator<String> |
keys() |
static JCEKSPasswordAliasStore |
newInstance(String pathToAliasStore,
char[] storePassword) |
void |
put(String alias,
char[] password) |
void |
putAll(Map<String,char[]> settings) |
void |
putAll(org.glassfish.api.admin.PasswordAliasStore otherStore) |
void |
remove(String alias) |
int |
size() |
protected final void init(String pathToAliasStore, char[] storePassword)
public static JCEKSPasswordAliasStore newInstance(String pathToAliasStore, char[] storePassword)
public void clear()
clear in interface org.glassfish.api.admin.PasswordAliasStorepublic void put(String alias, char[] password)
put in interface org.glassfish.api.admin.PasswordAliasStorepublic void putAll(org.glassfish.api.admin.PasswordAliasStore otherStore)
putAll in interface org.glassfish.api.admin.PasswordAliasStorepublic void putAll(Map<String,char[]> settings)
putAll in interface org.glassfish.api.admin.PasswordAliasStorepublic void remove(String alias)
remove in interface org.glassfish.api.admin.PasswordAliasStorepublic boolean containsKey(String alias)
containsKey in interface org.glassfish.api.admin.PasswordAliasStorepublic char[] get(String alias)
get in interface org.glassfish.api.admin.PasswordAliasStorepublic boolean isEmpty()
isEmpty in interface org.glassfish.api.admin.PasswordAliasStorepublic Iterator<String> keys()
keys in interface org.glassfish.api.admin.PasswordAliasStorepublic int size()
size in interface org.glassfish.api.admin.PasswordAliasStoreCopyright © 2013. All Rights Reserved.