Interface HttpClientTransport

    • Field Detail

      • HTTP_DESTINATION_CONTEXT_KEY

        static final java.lang.String HTTP_DESTINATION_CONTEXT_KEY
        See Also:
        Constant Field Values
      • HTTP_CONNECTION_PROMISE_CONTEXT_KEY

        static final java.lang.String HTTP_CONNECTION_PROMISE_CONTEXT_KEY
        See Also:
        Constant Field Values
    • Method Detail

      • setHttpClient

        void setHttpClient​(HttpClient client)
        Sets the HttpClient instance on this transport.

        This is needed because of a chicken-egg problem: in order to create the HttpClient a HttpClientTransport is needed, that therefore cannot have a reference yet to the HttpClient.

        Parameters:
        client - the HttpClient that uses this transport.
      • newHttpDestination

        HttpDestination newHttpDestination​(Origin origin)
        Creates a new, transport-specific, HttpDestination object.

        HttpDestination controls the destination-connection cardinality: protocols like HTTP have 1-N cardinality, while multiplexed protocols like HTTP/2 have a 1-1 cardinality.

        Parameters:
        origin - the destination origin
        Returns:
        a new, transport-specific, HttpDestination object
      • connect

        void connect​(java.net.InetSocketAddress address,
                     java.util.Map<java.lang.String,​java.lang.Object> context)
        Establishes a physical connection to the given address.
        Parameters:
        address - the address to connect to
        context - the context information to establish the connection
      • getConnectionPoolFactory

        ConnectionPool.Factory getConnectionPoolFactory()
        Returns:
        the factory for ConnectionPool instances
      • setConnectionPoolFactory

        void setConnectionPoolFactory​(ConnectionPool.Factory factory)
        Parameters:
        factory - the factory for ConnectionPool instances