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
FieldsModifier and TypeFieldDescriptionprotected final FileModifiedTimeUpdaterprotected final FileModifiedTimeUpdaterprotected final FileModifiedTimeUpdaterFields inherited from class org.apache.pulsar.common.util.SslContextAutoRefreshBuilder
lastRefreshTime, refreshTime -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.netty.handler.ssl.SslContextReturns cached SSLContext.booleanReturns whether the key files modified after a refresh time, and context need update.io.netty.handler.ssl.SslContextupdate()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:SslContextAutoRefreshBuilderupdates and returns cached SSLContext.- Specified by:
updatein classSslContextAutoRefreshBuilder<io.netty.handler.ssl.SslContext>- Returns:
- Throws:
GeneralSecurityExceptionIOExceptionSSLExceptionFileNotFoundException
-
getSslContext
public io.netty.handler.ssl.SslContext getSslContext()Description copied from class:SslContextAutoRefreshBuilderReturns cached SSLContext.- Specified by:
getSslContextin classSslContextAutoRefreshBuilder<io.netty.handler.ssl.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<io.netty.handler.ssl.SslContext>- Returns:
- true if files modified
-