Class ServerH2StreamMultiplexer

java.lang.Object
org.apache.hc.core5.http2.impl.nio.ServerH2StreamMultiplexer
All Implemented Interfaces:
Closeable, 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 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 Details

    • 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 Details

    • toString

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

      public 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, IOException
      Throws:
      org.apache.hc.core5.http.HttpException
      IOException
    • onInput

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

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

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

      public final void onDisconnect()
    • onException

      public final void onException(Exception cause)
    • streamCount

      public int streamCount()
      Since:
      5.5
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.apache.hc.core5.http.HttpConnection
      Throws:
      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 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 SocketAddress getRemoteAddress()
      Specified by:
      getRemoteAddress in interface org.apache.hc.core5.http.HttpConnection
    • getLocalAddress

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