Class AlpnOpenListener

  • All Implemented Interfaces:
    OpenListener, EventListener, org.xnio.ChannelListener<org.xnio.StreamConnection>

    public class AlpnOpenListener
    extends Object
    implements org.xnio.ChannelListener<org.xnio.StreamConnection>, OpenListener
    Open listener adaptor for ALPN connections Not a proper open listener as such, but more a mechanism for selecting between them. The implementation delegates between JDK9AlpnOpenListener and JettyAlpnOpenListener based on the current JDK version.
    Author:
    Stuart Douglas
    • Constructor Detail

      • AlpnOpenListener

        public AlpnOpenListener​(org.xnio.Pool<ByteBuffer> bufferPool,
                                org.xnio.OptionMap undertowOptions,
                                DelegateOpenListener httpListener)
      • AlpnOpenListener

        public AlpnOpenListener​(org.xnio.Pool<ByteBuffer> bufferPool,
                                org.xnio.OptionMap undertowOptions)
      • AlpnOpenListener

        public AlpnOpenListener​(org.xnio.Pool<ByteBuffer> bufferPool,
                                org.xnio.OptionMap undertowOptions,
                                String fallbackProtocol,
                                DelegateOpenListener fallbackListener)
      • AlpnOpenListener

        public AlpnOpenListener​(ByteBufferPool bufferPool)
      • AlpnOpenListener

        public AlpnOpenListener​(ByteBufferPool bufferPool,
                                org.xnio.OptionMap undertowOptions)
    • Method Detail

      • getRootHandler

        public HttpHandler getRootHandler()
        Specified by:
        getRootHandler in interface OpenListener
        Returns:
        The first handler that will be executed by requests on the connector
      • setRootHandler

        public void setRootHandler​(HttpHandler rootHandler)
        Description copied from interface: OpenListener
        Sets the root handler
        Specified by:
        setRootHandler in interface OpenListener
        Parameters:
        rootHandler - The new root handler
      • getUndertowOptions

        public org.xnio.OptionMap getUndertowOptions()
        Specified by:
        getUndertowOptions in interface OpenListener
        Returns:
        The connector options
      • setUndertowOptions

        public void setUndertowOptions​(org.xnio.OptionMap undertowOptions)
        Specified by:
        setUndertowOptions in interface OpenListener
        Parameters:
        undertowOptions - The connector options
      • handleEvent

        public void handleEvent​(org.xnio.StreamConnection channel)
        Specified by:
        handleEvent in interface org.xnio.ChannelListener<org.xnio.StreamConnection>