Class ServerH2PrefaceHandler

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, org.apache.hc.core5.http.HttpConnection, org.apache.hc.core5.http.impl.nio.HttpConnectionEventHandler, org.apache.hc.core5.http.SocketModalCloseable, org.apache.hc.core5.io.ModalCloseable, org.apache.hc.core5.reactor.IOEventHandler

    @Internal
    public class ServerH2PrefaceHandler
    extends java.lang.Object
    I/O event handler for events fired by ProtocolIOSession that implements server side of the HTTP/2 protocol negotiation handshake.
    Since:
    5.2
    • Constructor Summary

      Constructors 
      Constructor Description
      ServerH2PrefaceHandler​(org.apache.hc.core5.reactor.ProtocolIOSession ioSession, ServerH2StreamMultiplexerFactory http2StreamHandlerFactory, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.ProtocolIOSession> resultCallback, org.apache.hc.core5.function.Callback<java.lang.Exception> exceptionCallback)  
      ServerH2PrefaceHandler​(org.apache.hc.core5.reactor.ProtocolIOSession ioSession, ServerH2StreamMultiplexerFactory http2StreamHandlerFactory, org.apache.hc.core5.function.Callback<java.lang.Exception> exceptionCallback)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void close​(org.apache.hc.core5.io.CloseMode closeMode)  
      void connected​(org.apache.hc.core5.reactor.IOSession session)  
      void disconnected​(org.apache.hc.core5.reactor.IOSession session)  
      void exception​(org.apache.hc.core5.reactor.IOSession session, java.lang.Exception cause)  
      org.apache.hc.core5.http.EndpointDetails getEndpointDetails()  
      java.net.SocketAddress getLocalAddress()  
      org.apache.hc.core5.http.ProtocolVersion getProtocolVersion()  
      java.net.SocketAddress getRemoteAddress()  
      org.apache.hc.core5.util.Timeout getSocketTimeout()  
      javax.net.ssl.SSLSession getSSLSession()  
      void inputReady​(org.apache.hc.core5.reactor.IOSession session, java.nio.ByteBuffer src)  
      boolean isOpen()  
      void outputReady​(org.apache.hc.core5.reactor.IOSession session)  
      void setSocketTimeout​(org.apache.hc.core5.util.Timeout timeout)  
      void timeout​(org.apache.hc.core5.reactor.IOSession session, org.apache.hc.core5.util.Timeout timeout)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.apache.hc.core5.http.HttpConnection

        isIdle
    • Constructor Detail

      • ServerH2PrefaceHandler

        public ServerH2PrefaceHandler​(org.apache.hc.core5.reactor.ProtocolIOSession ioSession,
                                      ServerH2StreamMultiplexerFactory http2StreamHandlerFactory,
                                      org.apache.hc.core5.function.Callback<java.lang.Exception> exceptionCallback)
      • ServerH2PrefaceHandler

        public ServerH2PrefaceHandler​(org.apache.hc.core5.reactor.ProtocolIOSession ioSession,
                                      ServerH2StreamMultiplexerFactory http2StreamHandlerFactory,
                                      org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.ProtocolIOSession> resultCallback,
                                      org.apache.hc.core5.function.Callback<java.lang.Exception> exceptionCallback)
    • Method Detail

      • connected

        public void connected​(org.apache.hc.core5.reactor.IOSession session)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • inputReady

        public void inputReady​(org.apache.hc.core5.reactor.IOSession session,
                               java.nio.ByteBuffer src)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • outputReady

        public void outputReady​(org.apache.hc.core5.reactor.IOSession session)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • toString

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

        public void timeout​(org.apache.hc.core5.reactor.IOSession session,
                            org.apache.hc.core5.util.Timeout timeout)
        Specified by:
        timeout in interface org.apache.hc.core5.reactor.IOEventHandler
      • exception

        public void exception​(org.apache.hc.core5.reactor.IOSession session,
                              java.lang.Exception cause)
        Specified by:
        exception in interface org.apache.hc.core5.reactor.IOEventHandler
      • disconnected

        public void disconnected​(org.apache.hc.core5.reactor.IOSession session)
        Specified by:
        disconnected in interface org.apache.hc.core5.reactor.IOEventHandler
      • 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
      • setSocketTimeout

        public void setSocketTimeout​(org.apache.hc.core5.util.Timeout timeout)
        Specified by:
        setSocketTimeout in interface org.apache.hc.core5.http.SocketModalCloseable
      • 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
      • isOpen

        public boolean isOpen()
        Specified by:
        isOpen in interface org.apache.hc.core5.http.HttpConnection
      • 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