Class ALPNHandler

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

    @Sharable
    public class ALPNHandler
    extends io.netty.handler.ssl.ApplicationProtocolNegotiationHandler
    Handler responsible for TLS/ALPN negotiation.
    Author:
    Sebastian Ɓaskawiec
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void configureHttp1​(io.netty.channel.ChannelPipeline pipeline)
      Configure pipeline for HTTP/1.1 after negotiated by ALPN
      protected void configureHttp2​(io.netty.channel.ChannelPipeline pipeline)
      Configure pipeline for HTTP/2 after negotiated via ALPN
      void configurePipeline​(io.netty.channel.ChannelHandlerContext ctx, java.lang.String protocol)  
      void configurePipeline​(io.netty.channel.ChannelPipeline pipeline, java.lang.String protocol)  
      io.netty.handler.ssl.ApplicationProtocolConfig getAlpnConfiguration()  
      io.netty.channel.ChannelHandler getHttp1Handler()  
      protected int maxContentLength()  
      • Methods inherited from class io.netty.handler.ssl.ApplicationProtocolNegotiationHandler

        exceptionCaught, handshakeFailure, userEventTriggered
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

        channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged
      • Methods inherited from class io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, handlerAdded, handlerRemoved, isSharable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.netty.channel.ChannelHandler

        handlerAdded, handlerRemoved
    • Field Detail

      • restServer

        protected final RestServer restServer
    • Constructor Detail

      • ALPNHandler

        public ALPNHandler​(RestServer restServer)
    • Method Detail

      • configurePipeline

        public void configurePipeline​(io.netty.channel.ChannelHandlerContext ctx,
                                      java.lang.String protocol)
        Specified by:
        configurePipeline in class io.netty.handler.ssl.ApplicationProtocolNegotiationHandler
      • configurePipeline

        public void configurePipeline​(io.netty.channel.ChannelPipeline pipeline,
                                      java.lang.String protocol)
      • configureHttp2

        protected void configureHttp2​(io.netty.channel.ChannelPipeline pipeline)
        Configure pipeline for HTTP/2 after negotiated via ALPN
      • configureHttp1

        protected void configureHttp1​(io.netty.channel.ChannelPipeline pipeline)
        Configure pipeline for HTTP/1.1 after negotiated by ALPN
      • maxContentLength

        protected int maxContentLength()
      • getHttp1Handler

        public io.netty.channel.ChannelHandler getHttp1Handler()
      • getAlpnConfiguration

        public io.netty.handler.ssl.ApplicationProtocolConfig getAlpnConfiguration()