Class NetSslContextBuilder
java.lang.Object
org.apache.pulsar.common.util.SslContextAutoRefreshBuilder<SSLContext>
org.apache.pulsar.common.util.keystoretls.NetSslContextBuilder
Similar to `DefaultSslContextBuilder`, which build `javax.net.ssl.SSLContext` for web service.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final FileModifiedTimeUpdaterprotected final Stringprotected final Stringprotected final Stringprotected final booleanprotected final FileModifiedTimeUpdaterprotected final Stringprotected final StringFields inherited from class org.apache.pulsar.common.util.SslContextAutoRefreshBuilder
lastRefreshTime, refreshTime -
Constructor Summary
ConstructorsConstructorDescriptionNetSslContextBuilder(String sslProviderString, String keyStoreTypeString, String keyStore, String keyStorePasswordPath, boolean allowInsecureConnection, String trustStoreTypeString, String trustStore, String trustStorePasswordPath, boolean requireTrustedClientCertOnConnect, long certRefreshInSec) -
Method Summary
Modifier and TypeMethodDescriptionReturns cached SSLContext.booleanReturns whether the key files modified after a refresh time, and context need update.update()updates and returns cached SSLContext.Methods inherited from class org.apache.pulsar.common.util.SslContextAutoRefreshBuilder
get
-
Field Details
-
tlsAllowInsecureConnection
protected final boolean tlsAllowInsecureConnection -
tlsRequireTrustedClientCertOnConnect
protected final boolean tlsRequireTrustedClientCertOnConnect -
tlsProvider
-
tlsKeyStoreType
-
tlsKeyStorePassword
-
tlsKeyStore
-
tlsTrustStoreType
-
tlsTrustStorePassword
-
tlsTrustStore
-
-
Constructor Details
-
NetSslContextBuilder
public NetSslContextBuilder(String sslProviderString, String keyStoreTypeString, String keyStore, String keyStorePasswordPath, boolean allowInsecureConnection, String trustStoreTypeString, String trustStore, String trustStorePasswordPath, boolean requireTrustedClientCertOnConnect, long certRefreshInSec)
-
-
Method Details
-
update
Description copied from class:SslContextAutoRefreshBuilderupdates and returns cached SSLContext.- Specified by:
updatein classSslContextAutoRefreshBuilder<SSLContext>- Returns:
- Throws:
GeneralSecurityExceptionIOException
-
getSslContext
Description copied from class:SslContextAutoRefreshBuilderReturns cached SSLContext.- Specified by:
getSslContextin classSslContextAutoRefreshBuilder<SSLContext>- Returns:
-
needUpdate
public boolean needUpdate()Description copied from class:SslContextAutoRefreshBuilderReturns whether the key files modified after a refresh time, and context need update.- Specified by:
needUpdatein classSslContextAutoRefreshBuilder<SSLContext>- Returns:
- true if files modified
-