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

public Interface SslContextFactory

Known Direct Implementers
io.vertx.core.spi.tls.DefaultSslContextFactory
Imports
io.netty.handler.ssl.ClientAuth, .SslContext, javax.net.ssl.KeyManagerFactory, .SSLException, .TrustManagerFactory, java.util.List, .Set

A factory for a Netty SslContext, the factory is configured with the fluent setters until create() to obtain a properly configured SslContext.
Author
Julien Viet

Method Summary

Modifier and TypeMethod and Description
public default SslContextFactory

Returns:

a reference to this, so the API can be used fluently
applicationProtocols
(List<String>
this list of application protocols
applicationProtocols
)

Set the application protocols to use when using ALPN.

public default SslContextFactory

Returns:

a reference to this, so the API can be used fluently
clientAuth
(ClientAuth
the client auth to use
clientAuth
)

Configures the client auth

public SslContext

Returns:

a configured SslContext
create
()

public default SslContextFactory

Returns:

a reference to this, so the API can be used fluently
enabledCipherSuites
(Set<String>
the set of cipher suites
enabledCipherSuites
)

Set the enabled cipher suites.

public default SslContextFactory

Returns:

a reference to this, so the API can be used fluently
forClient
(boolean
true for client otherwise for servers
forClient
)

Set whether to build a context for clients or for servers

public default SslContextFactory

Returns:

a reference to this, so the API can be used fluently
keyMananagerFactory
(KeyManagerFactory
the key manager factory instance
kmf
)

Set the key manager factory to use.

public default SslContextFactory

Returns:

a reference to this, so the API can be used fluently
serverName
(String
the server name
serverName
)

Set the SNI server name.

public default SslContextFactory

Returns:

a reference to this, so the API can be used fluently
trustManagerFactory
(TrustManagerFactory
the trust manager factory instance
tmf
)

Set the trust manager factory to use.

public default SslContextFactory

Returns:

a reference to this, so the API can be used fluently
useAlpn
(boolean
true to use ALPN
useAlpn
)

Set whether to use ALPN.

Method Detail

applicationProtocolsback to summary
public default SslContextFactory applicationProtocols(List<String> 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

clientAuthback to summary
public default SslContextFactory clientAuth(ClientAuth 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

createback to summary
public SslContext create() throws SSLException
Returns:SslContext

a configured SslContext

enabledCipherSuitesback to summary
public default SslContextFactory enabledCipherSuites(Set<String> 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

forClientback to summary
public default SslContextFactory forClient(boolean 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

keyMananagerFactoryback to summary
public default SslContextFactory keyMananagerFactory(KeyManagerFactory kmf)

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

serverNameback to summary
public default SslContextFactory serverName(String serverName)

Set the SNI server name.

Parameters
serverName:String

the server name

Returns:SslContextFactory

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

trustManagerFactoryback to summary
public default SslContextFactory trustManagerFactory(TrustManagerFactory tmf)

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

useAlpnback to summary
public default SslContextFactory useAlpn(boolean 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