Package com.tangosol.net.ssl
Class AbstractKeyStoreLoader
java.lang.Object
com.tangosol.net.ssl.AbstractKeyStoreLoader
- All Implemented Interfaces:
KeyStoreLoader
- Direct Known Subclasses:
URLKeyStoreLoader
A base class for
KeyStoreLoader implementations.- Since:
- 22.06
- Author:
- Jonathan Knight 2020.01.25
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected abstract InputStreamOpen anInputStreamfor the specified named resource, which should be the contents of a JavaKeyStorein the format required by thisKeyStoreLoaderimplementation.getName()inthashCode()load(String sType, PasswordProvider password) Load a namedKeyStore.protected voidtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.tangosol.net.ssl.KeyStoreLoader
createKeyStore, isEnabled, isRefreshable, load, load
-
Field Details
-
m_sName
The name of the keystore to load.
-
-
Constructor Details
-
AbstractKeyStoreLoader
-
-
Method Details
-
getName
-
load
public KeyStore load(String sType, PasswordProvider password) throws GeneralSecurityException, IOException Description copied from interface:KeyStoreLoaderLoad a namedKeyStore.- Specified by:
loadin interfaceKeyStoreLoader- Parameters:
sType- theKeyStoretypepassword- an optionalPasswordProviderfor theKeyStorepassword- Returns:
- the
KeyStoreornullif no key could be loaded - Throws:
GeneralSecurityExceptionIOException
-
getInputStream
Open anInputStreamfor the specified named resource, which should be the contents of a JavaKeyStorein the format required by thisKeyStoreLoaderimplementation.How the
InputStreamis created based on the name is purely dependent on how subclasses are implemented. For example, the name could be a URL, or it could refer to a name of a secret in some secrets store, etc.- Returns:
- an
InputStreamcontaining the named resource contents, ornullif noInputStreamcould be opened - Throws:
IOException- if an error occurs creating theInputStream
-
equals
-
hashCode
public int hashCode() -
toString
-
safeClose
Close the specifiedCloseable, ignoring any errors or the fact that theCloseablemay benull.Any exception thrown calling
Closeable.close()will be ignored.- Parameters:
closeable- theCloseableto close
-