Package org.apache.pulsar.common.util
Class NettyServerSslContextBuilder
java.lang.Object
org.apache.pulsar.common.util.SslContextAutoRefreshBuilder<io.netty.handler.ssl.SslContext>
org.apache.pulsar.common.util.NettyServerSslContextBuilder
public class NettyServerSslContextBuilder
extends SslContextAutoRefreshBuilder<io.netty.handler.ssl.SslContext>
SSL context builder for Netty Server side.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final io.netty.handler.ssl.SslProviderprotected final booleanprotected final FileModifiedTimeUpdaterprotected final FileModifiedTimeUpdaterprotected final booleanprotected final FileModifiedTimeUpdaterFields inherited from class org.apache.pulsar.common.util.SslContextAutoRefreshBuilder
lastRefreshTime, refreshTime -
Constructor Summary
ConstructorsConstructorDescriptionNettyServerSslContextBuilder(boolean allowInsecure, String trustCertsFilePath, String certificateFilePath, String keyFilePath, Set<String> ciphers, Set<String> protocols, boolean requireTrustedClientCertOnConnect, long delayInSeconds) NettyServerSslContextBuilder(io.netty.handler.ssl.SslProvider sslProvider, boolean allowInsecure, String trustCertsFilePath, String certificateFilePath, String keyFilePath, Set<String> ciphers, Set<String> protocols, boolean requireTrustedClientCertOnConnect, long delayInSeconds) -
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
-
tlsAllowInsecureConnection
protected final boolean tlsAllowInsecureConnection -
tlsTrustCertsFilePath
-
tlsCertificateFilePath
-
tlsKeyFilePath
-
tlsCiphers
-
tlsProtocols
-
tlsRequireTrustedClientCertOnConnect
protected final boolean tlsRequireTrustedClientCertOnConnect -
sslProvider
protected final io.netty.handler.ssl.SslProvider sslProvider
-
-
Constructor Details
-
NettyServerSslContextBuilder
-
NettyServerSslContextBuilder
-
-
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
-