class SniHandler extends AbstractSniHandler<SslContext> {

    protected void replaceHandler(ChannelHandlerContext ctx, String hostname, SslContext sslContext) throws Exception {
        SslHandler sslHandler = null;
        try {
            sslHandler = newSslHandler(sslContext, ctx.alloc());
            ctx.pipeline().replace(this, SslHandler.class.getName(), sslHandler);
            sslHandler = null;
        } finally {
            // Since the SslHandler was not inserted into the pipeline the ownership of the SSLEngine was not
            // transferred to the SslHandler.
            // See https://github.com/netty/netty/issues/5678
            if (sslHandler != null) {
                ReferenceCountUtil.safeRelease(sslHandler.engine());
            }
        }
    }

    public  SniHandler(Mapping<? super String, ? extends SslContext> mapping);
    public  SniHandler(DomainNameMapping<? extends SslContext> mapping);
    @SuppressWarnings("unchecked") public  SniHandler(AsyncMapping<? super String, ? extends SslContext> mapping);

}