Interface ManagedAsyncClientConnection

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable, org.apache.hc.core5.http.HttpConnection, org.apache.hc.core5.io.ModalCloseable, org.apache.hc.core5.http.SocketModalCloseable, org.apache.hc.core5.reactor.ssl.TransportSecurityLayer
    All Known Implementing Classes:
    DefaultManagedAsyncClientConnection

    @Internal
    public interface ManagedAsyncClientConnection
    extends org.apache.hc.core5.http.HttpConnection, org.apache.hc.core5.reactor.ssl.TransportSecurityLayer
    Represents a managed asynchronous connection whose state and life cycle is managed by a connection manager.
    Since:
    5.0
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void activate()
      Restores the connection from idle mode.
      void passivate()
      Puts the connection into idle mode.
      void submitCommand​(org.apache.hc.core5.reactor.Command command, org.apache.hc.core5.reactor.Command.Priority priority)
      Submits the given command for execution.
      default void switchProtocol​(java.lang.String protocolId, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.ProtocolIOSession> callback)
      Switches this I/O session to the application protocol with the given ID.
      • Methods inherited from interface org.apache.hc.core5.http.HttpConnection

        close, getEndpointDetails, getLocalAddress, getProtocolVersion, getRemoteAddress, getSSLSession, isOpen
      • Methods inherited from interface org.apache.hc.core5.io.ModalCloseable

        close
      • Methods inherited from interface org.apache.hc.core5.http.SocketModalCloseable

        getSocketTimeout, setSocketTimeout
      • Methods inherited from interface org.apache.hc.core5.reactor.ssl.TransportSecurityLayer

        getTlsDetails, startTls, startTls
    • Method Detail

      • submitCommand

        void submitCommand​(org.apache.hc.core5.reactor.Command command,
                           org.apache.hc.core5.reactor.Command.Priority priority)
        Submits the given command for execution.
        Parameters:
        command - the command to be executed.
        priority - the command priority.
      • passivate

        void passivate()
        Puts the connection into idle mode.
      • activate

        void activate()
        Restores the connection from idle mode.
      • switchProtocol

        default void switchProtocol​(java.lang.String protocolId,
                                    org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.ProtocolIOSession> callback)
                             throws java.lang.UnsupportedOperationException
        Switches this I/O session to the application protocol with the given ID.
        Parameters:
        protocolId - the application protocol ID
        callback - the result callback
        Throws:
        java.lang.UnsupportedOperationException - if application protocol switch is not supported.
        Since:
        5.2