Package io.vertx.core.spi.tls
Class DefaultSslContextFactory
- java.lang.Object
-
- io.vertx.core.spi.tls.DefaultSslContextFactory
-
- All Implemented Interfaces:
SslContextFactory
public class DefaultSslContextFactory extends Object implements SslContextFactory
The default implementation ofSslContextFactorythat creates and configures a NettySslContextusing aSslContextBuilder.- Author:
- Tim Fox, Julien Viet
-
-
Constructor Summary
Constructors Constructor Description DefaultSslContextFactory(SslProvider sslProvider, boolean sslSessionCacheEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SslContextFactoryapplicationProtocols(List<String> applicationProtocols)Set the application protocols to use when using ALPN.SslContextFactoryclientAuth(ClientAuth clientAuth)Configures the client authSslContextcreate()SslContextFactoryenabledCipherSuites(Set<String> enabledCipherSuites)Set the enabled cipher suites.SslContextFactoryforClient(boolean forClient)Set whether to build a context for clients or for serversSslContextFactorykeyMananagerFactory(KeyManagerFactory kmf)Set the key manager factory to use.SslContextFactorytrustManagerFactory(TrustManagerFactory tmf)Set the trust manager factory to use.SslContextFactoryuseAlpn(boolean useAlpn)Set whether to use ALPN.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.vertx.core.spi.tls.SslContextFactory
serverName
-
-
-
-
Constructor Detail
-
DefaultSslContextFactory
public DefaultSslContextFactory(SslProvider sslProvider, boolean sslSessionCacheEnabled)
-
-
Method Detail
-
useAlpn
public SslContextFactory useAlpn(boolean useAlpn)
Description copied from interface:SslContextFactorySet whether to use ALPN.- Specified by:
useAlpnin interfaceSslContextFactory- Parameters:
useAlpn-trueto use ALPN- Returns:
- a reference to this, so the API can be used fluently
-
clientAuth
public SslContextFactory clientAuth(ClientAuth clientAuth)
Description copied from interface:SslContextFactoryConfigures the client auth- Specified by:
clientAuthin interfaceSslContextFactory- Parameters:
clientAuth- the client auth to use- Returns:
- a reference to this, so the API can be used fluently
-
forClient
public SslContextFactory forClient(boolean forClient)
Description copied from interface:SslContextFactorySet whether to build a context for clients or for servers- Specified by:
forClientin interfaceSslContextFactory- Parameters:
forClient-truefor client otherwise for servers- Returns:
- a reference to this, so the API can be used fluently
-
keyMananagerFactory
public SslContextFactory keyMananagerFactory(KeyManagerFactory kmf)
Description copied from interface:SslContextFactorySet the key manager factory to use.- Specified by:
keyMananagerFactoryin interfaceSslContextFactory- Parameters:
kmf- the key manager factory instance- Returns:
- a reference to this, so the API can be used fluently
-
trustManagerFactory
public SslContextFactory trustManagerFactory(TrustManagerFactory tmf)
Description copied from interface:SslContextFactorySet the trust manager factory to use.- Specified by:
trustManagerFactoryin interfaceSslContextFactory- Parameters:
tmf- the trust manager factory instance- Returns:
- a reference to this, so the API can be used fluently
-
create
public SslContext create() throws SSLException
- Specified by:
createin interfaceSslContextFactory- Returns:
- a configured
SslContext - Throws:
SSLException
-
enabledCipherSuites
public SslContextFactory enabledCipherSuites(Set<String> enabledCipherSuites)
Description copied from interface:SslContextFactorySet the enabled cipher suites.- Specified by:
enabledCipherSuitesin interfaceSslContextFactory- Parameters:
enabledCipherSuites- the set of cipher suites- Returns:
- a reference to this, so the API can be used fluently
-
applicationProtocols
public SslContextFactory applicationProtocols(List<String> applicationProtocols)
Description copied from interface:SslContextFactorySet the application protocols to use when using ALPN.- Specified by:
applicationProtocolsin interfaceSslContextFactory- Parameters:
applicationProtocols- this list of application protocols- Returns:
- a reference to this, so the API can be used fluently
-
-