Package com.vmware.security.credstore
Class CredentialStoreFactory
- java.lang.Object
-
- com.vmware.security.credstore.CredentialStoreFactory
-
public class CredentialStoreFactory extends java.lang.ObjectFactory class providing instances of a {linkplain CredentialStore credential store}.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 Summary
Constructors Constructor Description CredentialStoreFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CredentialStoregetCredentialStore()Returns the default credential store.static CredentialStoregetCredentialStore(java.io.File file)Returns a credential store given the file backing it.
-
-
-
Method Detail
-
getCredentialStore
public static CredentialStore getCredentialStore() throws java.io.IOException
Returns the default credential store.- Throws:
java.io.IOException
-
getCredentialStore
public static CredentialStore getCredentialStore(java.io.File file) throws java.io.IOException
Returns a credential store given the file backing it.- Parameters:
file- the file to use, ornullto use the default- Returns:
- the credential store for the specified file
- Throws:
java.io.IOException
-
-