Interface OutgoingConnectionBuilder


public interface OutgoingConnectionBuilder
Builder for setting up a flow that will create one single connection per materialization to the specified host. When customization is done, the flow is created using http(), https(), http2() or http2WithPriorKnowledge().

Not for user extension

  • Method Details

    • http

      akka.stream.scaladsl.Flow<HttpRequest,HttpResponse,scala.concurrent.Future<Http.OutgoingConnection>> http()
      Create a flow that when materialized creates a single HTTP/1.1 plaintext connection with a default port 80 to the server.
      Returns:
      (undocumented)
    • http2

      akka.stream.scaladsl.Flow<HttpRequest,HttpResponse,scala.concurrent.Future<Http.OutgoingConnection>> http2()
      Create a flow that when materialized creates a single HTTP/2 TLS connection with a default port 443

      Note that the responses are not guaranteed to arrive in the same order as the requests go out (In the case of a HTTP/2 connection) so therefore requests needs to have a RequestResponseAssociation which Akka HTTP will carry over to the corresponding response for a request.

      Returns:
      (undocumented)
    • http2WithPriorKnowledge

      akka.stream.scaladsl.Flow<HttpRequest,HttpResponse,scala.concurrent.Future<Http.OutgoingConnection>> http2WithPriorKnowledge()
      Create a flow that when materialized creates a single HTTP/2 with 'prior knowledge' plaintext connection with a default port 80

      Note that the responses are not guaranteed to arrive in the same order as the requests go out (In the case of a HTTP/2 connection) so therefore requests needs to have a RequestResponseAssociation which Akka HTTP will carry over to the corresponding response for a request.

      Returns:
      (undocumented)
    • https

      akka.stream.scaladsl.Flow<HttpRequest,HttpResponse,scala.concurrent.Future<Http.OutgoingConnection>> https()
      Create a flow that when materialized creates a single HTTP/1.1 TLS connection with a default port 443
      Returns:
      (undocumented)
    • logTo

      OutgoingConnectionBuilder logTo(akka.event.LoggingAdapter logger)
      Use a custom logger
      Parameters:
      logger - (undocumented)
      Returns:
      (undocumented)
    • managedPersistentHttp2

      akka.stream.scaladsl.Flow<HttpRequest,HttpResponse,akka.NotUsed> managedPersistentHttp2()
      Create a flow that when materialized creates a managed HTTP/2 TLS connection with a default port 443.

      The connection will be re-established as needed.

      Note that the responses are not guaranteed to arrive in the same order as the requests go out so therefore requests needs to have a RequestResponseAssociation which Akka HTTP will carry over to the corresponding response for a request.

      Returns:
      (undocumented)
    • managedPersistentHttp2WithPriorKnowledge

      akka.stream.scaladsl.Flow<HttpRequest,HttpResponse,akka.NotUsed> managedPersistentHttp2WithPriorKnowledge()
      Create a flow that when materialized creates a single HTTP/2 with 'prior knowledge' plaintext connection with a default port 80

      The connection will be re-established as needed.

      Note that the responses are not guaranteed to arrive in the same order as the requests go out (In the case of a HTTP/2 connection) so therefore requests needs to have a RequestResponseAssociation which Akka HTTP will carry over to the corresponding response for a request.

      Returns:
      (undocumented)
    • toHost

      Change which host flows built with this builder connects to
      Parameters:
      host - (undocumented)
      Returns:
      (undocumented)
    • toJava

      INTERNAL API
      Returns:
      (undocumented)
    • toPort

      OutgoingConnectionBuilder toPort(int port)
      Change with port flows built with this builder connects to, if not set the protocol default is used.
      Parameters:
      port - (undocumented)
      Returns:
      (undocumented)
    • withClientConnectionSettings

      OutgoingConnectionBuilder withClientConnectionSettings(ClientConnectionSettings settings)
      Use custom ClientConnectionSettings for the connection.
      Parameters:
      settings - (undocumented)
      Returns:
      (undocumented)
    • withCustomHttpsConnectionContext

      OutgoingConnectionBuilder withCustomHttpsConnectionContext(HttpsConnectionContext httpsConnectionContext)
      Use a custom HttpsConnectionContext for the connection. Only applicable for https() and http2(), overrides defaultHttpsContext
      Parameters:
      httpsConnectionContext - (undocumented)
      Returns:
      (undocumented)