Top Description Fields Constructors Methods
io.vertx.core.net.impl

public Class SslChannelProvider

extends Object
Class Inheritance
Imports
io.netty.buffer.ByteBufAllocator, io.netty.channel.ChannelHandler, io.netty.handler.ssl.SniHandler, .SslContext, .SslHandler, io.netty.util.AsyncMapping, io.netty.util.concurrent.ImmediateExecutor, io.vertx.core.VertxException, io.vertx.core.net.HostAndPort, .SocketAddress, javax.net.ssl.KeyManagerFactory, .TrustManager, java.util.Map, java.util.concurrent.ConcurrentHashMap, .Executor, .TimeUnit

Provider for SslHandler and SniHandler.
SslContext instances are cached and reused.

Field Summary

Modifier and TypeField and Description
private final boolean
private final Map<String, SslContext>[]
private final SslContextProvider
private final SslContext[]
private final long
private final TimeUnit
private final boolean
private final boolean
private final boolean
private final Executor

Constructor Summary

AccessConstructor and Description
public
SslChannelProvider(SslContextProvider sslContextProvider, long sslHandshakeTimeout, TimeUnit sslHandshakeTimeoutUnit, boolean sni, boolean trustAll, boolean useAlpn, Executor workerPool, boolean useWorkerPool)

Method Summary

Modifier and TypeMethod and Description
public SslHandler
createClientSslHandler(SocketAddress remoteAddress, String serverName, boolean useAlpn)

public ChannelHandler
private SslHandler
createServerSslHandler(boolean useAlpn, HostAndPort remoteAddress)

private SniHandler
private static int
idx(boolean useAlpn)

public AsyncMapping<? super String, ? extends SslContext>

Returns:

the AsyncMapping
serverNameMapping
()

Server name AsyncMapping for SniHandler, mapping happens on a Vert.x worker thread.

public int
public SslContext
sslClientContext(String serverName, boolean useAlpn)

public SslContext
sslClientContext(String serverName, boolean useAlpn, boolean trustAll)

public SslContext
sslContext(String serverName, boolean useAlpn, boolean server, boolean trustAll)

public SslContextProvider
public SslContext
sslServerContext(boolean useAlpn)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sniback to summary
private final boolean sni
sslContextMapsback to summary
private final Map<String, SslContext>[] sslContextMaps
sslContextProviderback to summary
private final SslContextProvider sslContextProvider
sslContextsback to summary
private final SslContext[] sslContexts
sslHandshakeTimeoutback to summary
private final long sslHandshakeTimeout
sslHandshakeTimeoutUnitback to summary
private final TimeUnit sslHandshakeTimeoutUnit
trustAllback to summary
private final boolean trustAll
useAlpnback to summary
private final boolean useAlpn
useWorkerPoolback to summary
private final boolean useWorkerPool
workerPoolback to summary
private final Executor workerPool

Constructor Detail

SslChannelProviderback to summary
public SslChannelProvider(SslContextProvider sslContextProvider, long sslHandshakeTimeout, TimeUnit sslHandshakeTimeoutUnit, boolean sni, boolean trustAll, boolean useAlpn, Executor workerPool, boolean useWorkerPool)

Method Detail

createClientSslHandlerback to summary
public SslHandler createClientSslHandler(SocketAddress remoteAddress, String serverName, boolean useAlpn)
createServerHandlerback to summary
public ChannelHandler createServerHandler(HostAndPort remoteAddress)
createServerSslHandlerback to summary
private SslHandler createServerSslHandler(boolean useAlpn, HostAndPort remoteAddress)
createSniHandlerback to summary
private SniHandler createSniHandler(HostAndPort remoteAddress)
idxback to summary
private static int idx(boolean useAlpn)
serverNameMappingback to summary
public AsyncMapping<? super String, ? extends SslContext> serverNameMapping()

Server name AsyncMapping for SniHandler, mapping happens on a Vert.x worker thread.

Returns:AsyncMapping<? super String, ? extends SslContext>

the AsyncMapping

sniEntrySizeback to summary
public int sniEntrySize()
sslClientContextback to summary
public SslContext sslClientContext(String serverName, boolean useAlpn)
sslClientContextback to summary
public SslContext sslClientContext(String serverName, boolean useAlpn, boolean trustAll)
sslContextback to summary
public SslContext sslContext(String serverName, boolean useAlpn, boolean server, boolean trustAll) throws Exception
sslContextProviderback to summary
public SslContextProvider sslContextProvider()
sslServerContextback to summary
public SslContext sslServerContext(boolean useAlpn)