public class CredentialStoreFactory
extends java.lang.Object
If the file backing a credential store does not already exist, it is created
on the first call to CredentialStore.addPassword(java.lang.String, java.lang.String, java.lang.String). If the default file
is being used, its directory will also be created if necessary.
Each method of the returned credential store acquires a
lock
on the store for the duration of the method call, blocking if necessary to do
so. The implementation may time out (throwing IOException) if the
lock cannot be acquired within a reasonable amount of time, on the order of a
minute. Locks are acquired on behalf of the entire Java virtual machine, not
just the current thread.
The methods in this class may be invoked concurrently by multiple threads.
| Constructor and Description |
|---|
CredentialStoreFactory() |
| Modifier and Type | Method and Description |
|---|---|
static CredentialStore |
getCredentialStore()
Returns the default credential store.
|
static CredentialStore |
getCredentialStore(java.io.File file)
Returns a credential store given the file backing it.
|
public static CredentialStore getCredentialStore() throws java.io.IOException
java.io.IOExceptionpublic static CredentialStore getCredentialStore(java.io.File file) throws java.io.IOException
file - the file to use, or null to use the defaultjava.io.IOException