Package io.vertx.core.spi.tls
Interface SslContextFactory
-
- All Known Implementing Classes:
DefaultSslContextFactory
public interface SslContextFactoryA factory for a NettySslContext, the factory is configured with the fluent setters untilcreate()to obtain a properly configuredSslContext.- Author:
- Julien Viet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default SslContextFactoryapplicationProtocols(List<String> applicationProtocols)Set the application protocols to use when using ALPN.default SslContextFactoryclientAuth(ClientAuth clientAuth)Configures the client authSslContextcreate()default SslContextFactoryenabledCipherSuites(Set<String> enabledCipherSuites)Set the enabled cipher suites.default SslContextFactoryforClient(boolean forClient)Set whether to build a context for clients or for serversdefault SslContextFactorykeyMananagerFactory(KeyManagerFactory kmf)Set the key manager factory to use.default SslContextFactoryserverName(String serverName)Set the SNI server name.default SslContextFactorytrustManagerFactory(TrustManagerFactory tmf)Set the trust manager factory to use.default SslContextFactoryuseAlpn(boolean useAlpn)Set whether to use ALPN.
-
-
-
Method Detail
-
useAlpn
default SslContextFactory useAlpn(boolean useAlpn)
Set whether to use ALPN.- Parameters:
useAlpn-trueto use ALPN- Returns:
- a reference to this, so the API can be used fluently
-
clientAuth
default SslContextFactory clientAuth(ClientAuth clientAuth)
Configures the client auth- Parameters:
clientAuth- the client auth to use- Returns:
- a reference to this, so the API can be used fluently
-
forClient
default SslContextFactory forClient(boolean forClient)
Set whether to build a context for clients or for servers- Parameters:
forClient-truefor client otherwise for servers- Returns:
- a reference to this, so the API can be used fluently
-
keyMananagerFactory
default SslContextFactory keyMananagerFactory(KeyManagerFactory kmf)
Set the key manager factory to use.- Parameters:
kmf- the key manager factory instance- Returns:
- a reference to this, so the API can be used fluently
-
trustManagerFactory
default SslContextFactory trustManagerFactory(TrustManagerFactory tmf)
Set the trust manager factory to use.- Parameters:
tmf- the trust manager factory instance- Returns:
- a reference to this, so the API can be used fluently
-
enabledCipherSuites
default SslContextFactory enabledCipherSuites(Set<String> enabledCipherSuites)
Set the enabled cipher suites.- Parameters:
enabledCipherSuites- the set of cipher suites- Returns:
- a reference to this, so the API can be used fluently
-
applicationProtocols
default SslContextFactory applicationProtocols(List<String> applicationProtocols)
Set the application protocols to use when using ALPN.- Parameters:
applicationProtocols- this list of application protocols- Returns:
- a reference to this, so the API can be used fluently
-
serverName
default SslContextFactory serverName(String serverName)
Set the SNI server name.- Parameters:
serverName- the server name- Returns:
- a reference to this, so the API can be used fluently
-
create
SslContext create() throws SSLException
- Returns:
- a configured
SslContext - Throws:
SSLException
-
-