Class SslClientInitializer

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
com.linkedin.alpini.netty4.handlers.ChannelInitializer<io.netty.channel.Channel>
com.linkedin.alpini.netty4.ssl.SslClientInitializer
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

@Sharable public class SslClientInitializer extends ChannelInitializer<io.netty.channel.Channel>
Created by acurtis on 9/7/17.
  • Constructor Details

    • SslClientInitializer

      public SslClientInitializer(SSLEngineFactory sslEngineComponentFactory)
    • SslClientInitializer

      public SslClientInitializer(SSLEngineFactory sslEngineComponentFactory, boolean principalValidation)
  • Method Details

    • enableSslTaskExecutor

      public SslClientInitializer enableSslTaskExecutor(Executor executor)
      Configure for enabling the SslHandler to offload handshake compute tasks to an alternate executor.
      Parameters:
      executor - Executor to perform SslHandler tasks
      Returns:
      this
    • clientCertificateValidation

      protected boolean clientCertificateValidation(io.netty.channel.ChannelHandlerContext ctx, X509Certificate clientCert)
    • initChannel

      protected void initChannel(io.netty.channel.Channel ch) throws Exception
      Description copied from class: ChannelInitializer
      This method will be called once the Channel was registered. After the method returns this instance will be removed from the ChannelPipeline of the Channel.
      Specified by:
      initChannel in class ChannelInitializer<io.netty.channel.Channel>
      Parameters:
      ch - the Channel which was registered.
      Throws:
      Exception - is thrown if an error occurs. In that case it will be handled by ChannelInitializer.exceptionCaught(ChannelHandlerContext, Throwable) which will by default close the Channel.