Package com.tangosol.net.ssl
Class AbstractCertificateLoader
java.lang.Object
com.tangosol.net.ssl.AbstractCertificateLoader
- All Implemented Interfaces:
CertificateLoader
- Direct Known Subclasses:
URLCertificateLoader
A base class for
CertificateLoader implementations.- Since:
- 22.06
- Author:
- Jonathan Knight 2020.01.25
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCertificateLoader(String sName) Create anAbstractCertificateLoader. -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected abstract InputStreamOpen anInputStreamfor the specified named resource, which should be the contents of a JavaCertificatein the format required by thisCertificateLoaderimplementation.getName()Returns the name of theCertificateto load.inthashCode()booleanload()Load aCertificate.protected voidtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.tangosol.net.ssl.CertificateLoader
isRefreshable
-
Field Details
-
m_sName
The name of the certificate to load.
-
-
Constructor Details
-
AbstractCertificateLoader
Create anAbstractCertificateLoader.- Parameters:
sName- the name of the certificate to load
-
-
Method Details
-
load
Description copied from interface:CertificateLoaderLoad aCertificate.- Specified by:
loadin interfaceCertificateLoader- Returns:
- the
CertificatesorCertificate[0]if noCertificateswere loaded - Throws:
GeneralSecurityExceptionIOException
-
isEnabled
public boolean isEnabled()Description copied from interface:CertificateLoader- Specified by:
isEnabledin interfaceCertificateLoader- Returns:
trueif thisCertificateLoaderis enabled, orfalseifCertificateLoadershould not be used
-
getName
Returns the name of theCertificateto load.- Returns:
- the name of the
Certificateto load
-
getInputStream
Open anInputStreamfor the specified named resource, which should be the contents of a JavaCertificatein the format required by thisCertificateLoaderimplementation.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
-