Top Description Fields Constructors Methods
io.vertx.core.spi.tls

public Class DefaultSslContextFactory

extends Object
implements SslContextFactory
Class Inheritance
All Implemented Interfaces
io.vertx.core.spi.tls.SslContextFactory
Imports
io.netty.handler.ssl.ApplicationProtocolConfig, .ClientAuth, .OpenSsl, .OpenSslServerContext, .OpenSslServerSessionContext, .SslContext, .SslContextBuilder, .SslProvider, javax.net.ssl.KeyManagerFactory, .SSLException, .SSLSessionContext, .TrustManagerFactory, java.util.Collection, .List, .Set

The default implementation of SslContextFactory that creates and configures a Netty SslContext using a SslContextBuilder.
Authors
Tim Fox, Julien Viet

Field Summary

Modifier and TypeField and Description
private List<String>
private ClientAuth
private Set<String>
private boolean
private KeyManagerFactory
private final SslProvider
private final boolean
private TrustManagerFactory
private boolean

Constructor Summary

AccessConstructor and Description
public
DefaultSslContextFactory(SslProvider sslProvider, boolean sslSessionCacheEnabled)

Method Summary

Modifier and TypeMethod and Description
public SslContextFactory
applicationProtocols(List<String>
this list of application protocols
applicationProtocols
)

Overrides default io.vertx.core.spi.tls.SslContextFactory.applicationProtocols.

Set the application protocols to use when using ALPN.

public SslContextFactory
clientAuth(ClientAuth
the client auth to use
clientAuth
)

Overrides default io.vertx.core.spi.tls.SslContextFactory.clientAuth.

Configures the client auth

public SslContext
private SslContext
createContext(boolean useAlpn, boolean client, KeyManagerFactory kmf, TrustManagerFactory tmf)

public SslContextFactory
enabledCipherSuites(Set<String>
the set of cipher suites
enabledCipherSuites
)

Overrides default io.vertx.core.spi.tls.SslContextFactory.enabledCipherSuites.

Set the enabled cipher suites.

public SslContextFactory
forClient(boolean
true for client otherwise for servers
forClient
)

Overrides default io.vertx.core.spi.tls.SslContextFactory.forClient.

Set whether to build a context for clients or for servers

public SslContextFactory
keyMananagerFactory(KeyManagerFactory
the key manager factory instance
kmf
)

Overrides default io.vertx.core.spi.tls.SslContextFactory.keyMananagerFactory.

Set the key manager factory to use.

public SslContextFactory
trustManagerFactory(TrustManagerFactory
the trust manager factory instance
tmf
)

Overrides default io.vertx.core.spi.tls.SslContextFactory.trustManagerFactory.

Set the trust manager factory to use.

public SslContextFactory
useAlpn(boolean
true to use ALPN
useAlpn
)

Overrides default io.vertx.core.spi.tls.SslContextFactory.useAlpn.

Set whether to use ALPN.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

applicationProtocolsback to summary
private List<String> applicationProtocols
clientAuthback to summary
private ClientAuth clientAuth
enabledCipherSuitesback to summary
private Set<String> enabledCipherSuites
forClientback to summary
private boolean forClient
kmfback to summary
private KeyManagerFactory kmf
sslProviderback to summary
private final SslProvider sslProvider
sslSessionCacheEnabledback to summary
private final boolean sslSessionCacheEnabled
tmfback to summary
private TrustManagerFactory tmf
useAlpnback to summary
private boolean useAlpn

Constructor Detail

DefaultSslContextFactoryback to summary
public DefaultSslContextFactory(SslProvider sslProvider, boolean sslSessionCacheEnabled)

Method Detail

applicationProtocolsback to summary
public SslContextFactory applicationProtocols(List<String> applicationProtocols)

Overrides default io.vertx.core.spi.tls.SslContextFactory.applicationProtocols.

Doc from io.vertx.core.spi.tls.SslContextFactory.applicationProtocols.

Set the application protocols to use when using ALPN.

Parameters
applicationProtocols:List<String>

this list of application protocols

Returns:SslContextFactory

a reference to this, so the API can be used fluently

Annotations
@Override
clientAuthback to summary
public SslContextFactory clientAuth(ClientAuth clientAuth)

Overrides default io.vertx.core.spi.tls.SslContextFactory.clientAuth.

Doc from io.vertx.core.spi.tls.SslContextFactory.clientAuth.

Configures the client auth

Parameters
clientAuth:ClientAuth

the client auth to use

Returns:SslContextFactory

a reference to this, so the API can be used fluently

Annotations
@Override
createback to summary
public SslContext create() throws SSLException

Implements io.vertx.core.spi.tls.SslContextFactory.create.

Returns:SslContext

Doc from io.vertx.core.spi.tls.SslContextFactory.create.

a configured SslContext

Annotations
@Override
createContextback to summary
private SslContext createContext(boolean useAlpn, boolean client, KeyManagerFactory kmf, TrustManagerFactory tmf) throws SSLException
enabledCipherSuitesback to summary
public SslContextFactory enabledCipherSuites(Set<String> enabledCipherSuites)

Overrides default io.vertx.core.spi.tls.SslContextFactory.enabledCipherSuites.

Doc from io.vertx.core.spi.tls.SslContextFactory.enabledCipherSuites.

Set the enabled cipher suites.

Parameters
enabledCipherSuites:Set<String>

the set of cipher suites

Returns:SslContextFactory

a reference to this, so the API can be used fluently

Annotations
@Override
forClientback to summary
public SslContextFactory forClient(boolean forClient)

Overrides default io.vertx.core.spi.tls.SslContextFactory.forClient.

Doc from io.vertx.core.spi.tls.SslContextFactory.forClient.

Set whether to build a context for clients or for servers

Parameters
forClient:boolean

true for client otherwise for servers

Returns:SslContextFactory

a reference to this, so the API can be used fluently

Annotations
@Override
keyMananagerFactoryback to summary
public SslContextFactory keyMananagerFactory(KeyManagerFactory kmf)

Overrides default io.vertx.core.spi.tls.SslContextFactory.keyMananagerFactory.

Doc from io.vertx.core.spi.tls.SslContextFactory.keyMananagerFactory.

Set the key manager factory to use.

Parameters
kmf:KeyManagerFactory

the key manager factory instance

Returns:SslContextFactory

a reference to this, so the API can be used fluently

Annotations
@Override
trustManagerFactoryback to summary
public SslContextFactory trustManagerFactory(TrustManagerFactory tmf)

Overrides default io.vertx.core.spi.tls.SslContextFactory.trustManagerFactory.

Doc from io.vertx.core.spi.tls.SslContextFactory.trustManagerFactory.

Set the trust manager factory to use.

Parameters
tmf:TrustManagerFactory

the trust manager factory instance

Returns:SslContextFactory

a reference to this, so the API can be used fluently

Annotations
@Override
useAlpnback to summary
public SslContextFactory useAlpn(boolean useAlpn)

Overrides default io.vertx.core.spi.tls.SslContextFactory.useAlpn.

Doc from io.vertx.core.spi.tls.SslContextFactory.useAlpn.

Set whether to use ALPN.

Parameters
useAlpn:boolean

true to use ALPN

Returns:SslContextFactory

a reference to this, so the API can be used fluently

Annotations
@Override