Class SslClientHelloHandler<T>

  • All Implemented Interfaces:
    io.netty5.channel.ChannelHandler
    Direct Known Subclasses:
    AbstractSniHandler

    public abstract class SslClientHelloHandler<T>
    extends io.netty5.handler.codec.ByteToMessageDecoderForBuffer
    ByteToMessageDecoder which allows to be notified once a full ClientHello was received.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class io.netty5.handler.codec.ByteToMessageDecoderForBuffer

        io.netty5.handler.codec.ByteToMessageDecoderForBuffer.Cumulator
      • Nested classes/interfaces inherited from interface io.netty5.channel.ChannelHandler

        io.netty5.channel.ChannelHandler.Sharable
    • Field Summary

      • Fields inherited from class io.netty5.handler.codec.ByteToMessageDecoderForBuffer

        COMPOSITE_CUMULATOR, MERGE_CUMULATOR
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void decode​(io.netty5.channel.ChannelHandlerContext ctx, io.netty5.buffer.api.Buffer in)  
      protected void handlerRemoved0​(io.netty5.channel.ChannelHandlerContext ctx)  
      protected abstract io.netty5.util.concurrent.Future<T> lookup​(io.netty5.channel.ChannelHandlerContext ctx, io.netty5.buffer.api.Buffer clientHello)
      Kicks off a lookup for the given ClientHello and returns a Future which in turn will notify the onLookupComplete(ChannelHandlerContext, Future) on completion.
      protected abstract void onLookupComplete​(io.netty5.channel.ChannelHandlerContext ctx, io.netty5.util.concurrent.Future<? extends T> future)
      Called upon completion of the lookup(ChannelHandlerContext, Buffer) Future.
      void read​(io.netty5.channel.ChannelHandlerContext ctx)  
      • Methods inherited from class io.netty5.handler.codec.ByteToMessageDecoderForBuffer

        actualReadableBytes, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerAdded, handlerAdded0, handlerRemoved, internalBuffer, isSingleDecode, setSingleDecode, userEventTriggered
      • Methods inherited from class io.netty5.channel.ChannelHandlerAdapter

        ensureNotSharable, isSharable
      • Methods inherited from interface io.netty5.channel.ChannelHandler

        bind, channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, close, connect, deregister, disconnect, exceptionCaught, flush, register, write
    • Constructor Detail

      • SslClientHelloHandler

        public SslClientHelloHandler()
    • Method Detail

      • decode

        protected void decode​(io.netty5.channel.ChannelHandlerContext ctx,
                              io.netty5.buffer.api.Buffer in)
                       throws Exception
        Specified by:
        decode in class io.netty5.handler.codec.ByteToMessageDecoderForBuffer
        Throws:
        Exception
      • handlerRemoved0

        protected void handlerRemoved0​(io.netty5.channel.ChannelHandlerContext ctx)
                                throws Exception
        Overrides:
        handlerRemoved0 in class io.netty5.handler.codec.ByteToMessageDecoderForBuffer
        Throws:
        Exception
      • lookup

        protected abstract io.netty5.util.concurrent.Future<T> lookup​(io.netty5.channel.ChannelHandlerContext ctx,
                                                                      io.netty5.buffer.api.Buffer clientHello)
                                                               throws Exception
        Kicks off a lookup for the given ClientHello and returns a Future which in turn will notify the onLookupComplete(ChannelHandlerContext, Future) on completion. See https://tools.ietf.org/html/rfc5246#section-7.4.1.2
         struct {
            ProtocolVersion client_version;
            Random random;
            SessionID session_id;
            CipherSuite cipher_suites<2..2^16-2>;
            CompressionMethod compression_methods<1..2^8-1>;
            select (extensions_present) {
                case false:
                    struct {};
                case true:
                    Extension extensions<0..2^16-1>;
            };
         } ClientHello;
         
        Throws:
        Exception
        See Also:
        onLookupComplete(ChannelHandlerContext, Future)
      • read

        public void read​(io.netty5.channel.ChannelHandlerContext ctx)