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
Modifier and TypeFieldDescriptionprotected final boolean
protected final FileModifiedTimeUpdater
protected final String
protected final String
protected final String
protected final boolean
protected final FileModifiedTimeUpdater
protected final String
protected final String
Fields inherited from class org.apache.pulsar.common.util.SslContextAutoRefreshBuilder
lastRefreshTime, refreshTime
-
Constructor Summary
ConstructorDescriptionNetSslContextBuilder
(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.boolean
Returns 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:SslContextAutoRefreshBuilder
updates and returns cached SSLContext.- Specified by:
update
in classSslContextAutoRefreshBuilder<SSLContext>
- Returns:
- Throws:
GeneralSecurityException
IOException
-
getSslContext
Description copied from class:SslContextAutoRefreshBuilder
Returns cached SSLContext.- Specified by:
getSslContext
in classSslContextAutoRefreshBuilder<SSLContext>
- Returns:
-
needUpdate
public boolean needUpdate()Description copied from class:SslContextAutoRefreshBuilder
Returns whether the key files modified after a refresh time, and context need update.- Specified by:
needUpdate
in classSslContextAutoRefreshBuilder<SSLContext>
- Returns:
- true if files modified
-