Enables SNI (Server Name Indication) extension for server side SSL. For clients support SNI, the server could have multiple host name bound on a single IP. The client will send host name in the handshake data so server could decide which certificate to choose for the host name.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final SniHandler. | |
| private static final InternalLogger | |
| protected final AsyncMapping | |
| private volatile SniHandler. |
| Access | Constructor and Description |
|---|---|
| public | SniHandler(Mapping<? super String, ? extends SslContext>
the mapping of domain name to mapping)SslContextCreates a SNI detection handler with configured |
| public | SniHandler(DomainNameMapping<? extends SslContext>
the mapping of domain name to mapping)SslContext
Deprecated
as a consequence of
Creates a SNI detection handler with configured DomainNameMapping being deprecated.
SslContext
maintained by DomainNameMapping
|
| public | SniHandler(AsyncMapping<? super String, ? extends SslContext>
the mapping of domain name to mapping)SslContextCreates a SNI detection handler with configured |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| protected Future | lookup(ChannelHandlerContext ctx, String hostname)
Implements abstract io. AsyncMapping#map(Object, Promise) but
users can override this method to implement custom behavior.
|
| protected SslHandler | newSslHandler(SslContext context, BufferAllocator allocator)
Returns a new |
| protected final void | onLookupComplete(ChannelHandlerContext ctx, String hostname, Future<? extends SslContext> future)
Implements abstract io. lookup(ChannelHandlerContext, String) Future.
|
| protected void | replaceHandler(ChannelHandlerContext ctx, String hostname, SslContext sslContext)
The default implementation of this method will simply replace |
| public SslContext |
| EMPTY_SELECTION | back to summary |
|---|---|
| private static final SniHandler. | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| mapping | back to summary |
|---|---|
| protected final AsyncMapping<String, SslContext> mapping | |
| selection | back to summary |
|---|---|
| private volatile SniHandler. | |
| SniHandler | back to summary |
|---|---|
| public SniHandler(Mapping<? super String, ? extends SslContext> mapping) Creates a SNI detection handler with configured
| |
| SniHandler | back to summary |
|---|---|
| public SniHandler(DomainNameMapping<? extends SslContext> mapping)
Deprecated as a consequence of Creates a SNI detection handler with configured
| |
| SniHandler | back to summary |
|---|---|
| public SniHandler(AsyncMapping<? super String, ? extends SslContext> mapping) Creates a SNI detection handler with configured
| |
| hostname | back to summary |
|---|---|
public String hostname()
| |
| lookup | back to summary |
|---|---|
| protected Future Implements abstract io. The default implementation will simply call
| |
| newSslHandler | back to summary |
|---|---|
| protected SslHandler newSslHandler(SslContext context, BufferAllocator allocator) Returns a new | |
| onLookupComplete | back to summary |
|---|---|
| protected final void onLookupComplete(ChannelHandlerContext ctx, String hostname, Future<? extends SslContext> future) throws Exception Implements abstract io. Doc from io. Called upon completion of the
| |
| replaceHandler | back to summary |
|---|---|
| protected void replaceHandler(ChannelHandlerContext ctx, String hostname, SslContext sslContext) throws Exception The default implementation of this method will simply replace | |
| sslContext | back to summary |
|---|---|
public SslContext sslContext()
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Mapping |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Future | map(String input, Promise<SslContext> promise)
Implements io. Future that will provide the result of the mapping.
|
| mapping | back to summary |
|---|---|
| private final Mapping<? super String, ? extends SslContext> mapping | |
| AsyncMappingAdapter | back to summary |
|---|---|
| private AsyncMappingAdapter(Mapping<? super String, ? extends SslContext> mapping) | |
| map | back to summary |
|---|---|
| public Future Implements io. Doc from io. Returns the
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final SslContext | |
| pack-priv final String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| context | back to summary |
|---|---|
| pack-priv final SslContext context | |
| hostname | back to summary |
|---|---|
| pack-priv final String hostname | |
| Selection | back to summary |
|---|---|
| pack-priv Selection(SslContext context, String hostname) | |