Package org.apache.pulsar.common.util
Class NettyClientSslContextRefresher
java.lang.Object
org.apache.pulsar.common.util.SslContextAutoRefreshBuilder<io.netty.handler.ssl.SslContext>
org.apache.pulsar.common.util.NettyClientSslContextRefresher
public class NettyClientSslContextRefresher
extends SslContextAutoRefreshBuilder<io.netty.handler.ssl.SslContext>
SSL context builder for Netty Client side.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final FileModifiedTimeUpdater
protected final FileModifiedTimeUpdater
protected final FileModifiedTimeUpdater
Fields inherited from class org.apache.pulsar.common.util.SslContextAutoRefreshBuilder
lastRefreshTime, refreshTime
-
Constructor Summary
ConstructorDescriptionNettyClientSslContextRefresher
(io.netty.handler.ssl.SslProvider sslProvider, boolean allowInsecure, String trustCertsFilePath, AuthenticationDataProvider authData, Set<String> ciphers, Set<String> protocols, long delayInSeconds) -
Method Summary
Modifier and TypeMethodDescriptionio.netty.handler.ssl.SslContext
Returns cached SSLContext.boolean
Returns whether the key files modified after a refresh time, and context need update.io.netty.handler.ssl.SslContext
update()
updates and returns cached SSLContext.Methods inherited from class org.apache.pulsar.common.util.SslContextAutoRefreshBuilder
get
-
Field Details
-
tlsTrustCertsFilePath
-
tlsCertsFilePath
-
tlsPrivateKeyFilePath
-
-
Constructor Details
-
NettyClientSslContextRefresher
-
-
Method Details
-
update
public io.netty.handler.ssl.SslContext update() throws SSLException, FileNotFoundException, GeneralSecurityException, IOExceptionDescription copied from class:SslContextAutoRefreshBuilder
updates and returns cached SSLContext.- Specified by:
update
in classSslContextAutoRefreshBuilder<io.netty.handler.ssl.SslContext>
- Returns:
- Throws:
GeneralSecurityException
IOException
SSLException
FileNotFoundException
-
getSslContext
public io.netty.handler.ssl.SslContext getSslContext()Description copied from class:SslContextAutoRefreshBuilder
Returns cached SSLContext.- Specified by:
getSslContext
in classSslContextAutoRefreshBuilder<io.netty.handler.ssl.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<io.netty.handler.ssl.SslContext>
- Returns:
- true if files modified
-