Class ServerH2StreamMultiplexer

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, org.apache.hc.core5.http.HttpConnection, org.apache.hc.core5.http.SocketModalCloseable, org.apache.hc.core5.io.ModalCloseable, org.apache.hc.core5.util.Identifiable

    @Internal
    public class ServerH2StreamMultiplexer
    extends java.lang.Object
    I/O event handler for events fired by ProtocolIOSession that implements server side HTTP/2 messaging protocol with full support for multiplexed message transmission.
    Since:
    5.0
    • Constructor Summary

      Constructors 
      Constructor Description
      ServerH2StreamMultiplexer​(org.apache.hc.core5.reactor.ProtocolIOSession ioSession, org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncServerExchangeHandler> exchangeHandlerFactory, org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig, H2Config h2Config)  
      ServerH2StreamMultiplexer​(org.apache.hc.core5.reactor.ProtocolIOSession ioSession, FrameFactory frameFactory, org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncServerExchangeHandler> exchangeHandlerFactory, org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig, H2Config h2Config, H2StreamListener streamListener)  
    • Constructor Detail

      • ServerH2StreamMultiplexer

        public ServerH2StreamMultiplexer​(org.apache.hc.core5.reactor.ProtocolIOSession ioSession,
                                         FrameFactory frameFactory,
                                         org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor,
                                         org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncServerExchangeHandler> exchangeHandlerFactory,
                                         org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig,
                                         H2Config h2Config,
                                         H2StreamListener streamListener)
      • ServerH2StreamMultiplexer

        public ServerH2StreamMultiplexer​(org.apache.hc.core5.reactor.ProtocolIOSession ioSession,
                                         org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor,
                                         org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncServerExchangeHandler> exchangeHandlerFactory,
                                         org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig,
                                         H2Config h2Config)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface org.apache.hc.core5.util.Identifiable
      • onConnect

        public final void onConnect()
                             throws org.apache.hc.core5.http.HttpException,
                                    java.io.IOException
        Throws:
        org.apache.hc.core5.http.HttpException
        java.io.IOException
      • onInput

        public final void onInput​(java.nio.ByteBuffer src)
                           throws org.apache.hc.core5.http.HttpException,
                                  java.io.IOException
        Throws:
        org.apache.hc.core5.http.HttpException
        java.io.IOException
      • onOutput

        public final void onOutput()
                            throws org.apache.hc.core5.http.HttpException,
                                   java.io.IOException
        Throws:
        org.apache.hc.core5.http.HttpException
        java.io.IOException
      • onTimeout

        public final void onTimeout​(org.apache.hc.core5.util.Timeout timeout)
                             throws org.apache.hc.core5.http.HttpException,
                                    java.io.IOException
        Throws:
        org.apache.hc.core5.http.HttpException
        java.io.IOException
      • onDisconnect

        public final void onDisconnect()
      • onException

        public final void onException​(java.lang.Exception cause)
      • streamCount

        public int streamCount()
        Since:
        5.5
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface org.apache.hc.core5.http.HttpConnection
        Throws:
        java.io.IOException
      • close

        public void close​(org.apache.hc.core5.io.CloseMode closeMode)
        Specified by:
        close in interface org.apache.hc.core5.io.ModalCloseable
      • isOpen

        public boolean isOpen()
        Specified by:
        isOpen in interface org.apache.hc.core5.http.HttpConnection
      • setSocketTimeout

        public void setSocketTimeout​(org.apache.hc.core5.util.Timeout timeout)
        Specified by:
        setSocketTimeout in interface org.apache.hc.core5.http.SocketModalCloseable
      • getSSLSession

        public javax.net.ssl.SSLSession getSSLSession()
        Specified by:
        getSSLSession in interface org.apache.hc.core5.http.HttpConnection
      • getEndpointDetails

        public org.apache.hc.core5.http.EndpointDetails getEndpointDetails()
        Specified by:
        getEndpointDetails in interface org.apache.hc.core5.http.HttpConnection
      • getSocketTimeout

        public org.apache.hc.core5.util.Timeout getSocketTimeout()
        Specified by:
        getSocketTimeout in interface org.apache.hc.core5.http.SocketModalCloseable
      • getProtocolVersion

        public org.apache.hc.core5.http.ProtocolVersion getProtocolVersion()
        Specified by:
        getProtocolVersion in interface org.apache.hc.core5.http.HttpConnection
      • getRemoteAddress

        public java.net.SocketAddress getRemoteAddress()
        Specified by:
        getRemoteAddress in interface org.apache.hc.core5.http.HttpConnection
      • getLocalAddress

        public java.net.SocketAddress getLocalAddress()
        Specified by:
        getLocalAddress in interface org.apache.hc.core5.http.HttpConnection