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
Modifier and TypeFieldDescriptionprotected final io.netty.handler.ssl.SslProvider
protected final boolean
protected final FileModifiedTimeUpdater
protected final FileModifiedTimeUpdater
protected final boolean
protected final FileModifiedTimeUpdater
Fields inherited from class org.apache.pulsar.common.util.SslContextAutoRefreshBuilder
lastRefreshTime, refreshTime
-
Constructor Summary
ConstructorDescriptionNettyServerSslContextBuilder
(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.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
-
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: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
-