public class SniHandler
extends io.netty.handler.codec.ByteToMessageDecoder
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.
| Constructor and Description |
|---|
SniHandler(io.netty.util.DomainNameMapping<? extends SslContext> mapping)
Create a SNI detection handler with configured
SslContext
maintained by DomainNameMapping |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in,
List<Object> out) |
String |
hostname() |
SslContext |
sslContext() |
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggeredchannelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtpublic SniHandler(io.netty.util.DomainNameMapping<? extends SslContext> mapping)
SslContext
maintained by DomainNameMappingmapping - the mapping of domain name to SslContextpublic String hostname()
public SslContext sslContext()
Copyright © 2008–2016 The Netty Project. All rights reserved.