Interface OutgoingConnectionBuilder
http()
, https()
, http2()
or http2WithPriorKnowledge()
.
Not for user extension
-
Method Summary
Modifier and TypeMethodDescriptionakka.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.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 443akka.stream.scaladsl.Flow<HttpRequest,
HttpResponse, scala.concurrent.Future<Http.OutgoingConnection>> Create a flow that when materialized creates a single HTTP/2 with 'prior knowledge' plaintext connection with a default port 80akka.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 443logTo
(akka.event.LoggingAdapter logger) Use a custom loggerakka.stream.scaladsl.Flow<HttpRequest,
HttpResponse, akka.NotUsed> Create a flow that when materialized creates a managed HTTP/2 TLS connection with a default port 443.akka.stream.scaladsl.Flow<HttpRequest,
HttpResponse, akka.NotUsed> Create a flow that when materialized creates a single HTTP/2 with 'prior knowledge' plaintext connection with a default port 80Change which host flows built with this builder connects totoJava()
INTERNAL APItoPort
(int port) Change with port flows built with this builder connects to, if not set the protocol default is used.Use customClientConnectionSettings
for the connection.withCustomHttpsConnectionContext
(HttpsConnectionContext httpsConnectionContext) Use a customHttpsConnectionContext
for the connection.
-
Method Details
-
http
akka.stream.scaladsl.Flow<HttpRequest,HttpResponse, http()scala.concurrent.Future<Http.OutgoingConnection>> 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, http2()scala.concurrent.Future<Http.OutgoingConnection>> Create a flow that when materialized creates a single HTTP/2 TLS connection with a default port 443Note 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, http2WithPriorKnowledge()scala.concurrent.Future<Http.OutgoingConnection>> Create a flow that when materialized creates a single HTTP/2 with 'prior knowledge' plaintext connection with a default port 80Note 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, https()scala.concurrent.Future<Http.OutgoingConnection>> Create a flow that when materialized creates a single HTTP/1.1 TLS connection with a default port 443- Returns:
- (undocumented)
-
logTo
Use a custom logger- Parameters:
logger
- (undocumented)- Returns:
- (undocumented)
-
managedPersistentHttp2
akka.stream.scaladsl.Flow<HttpRequest,HttpResponse, managedPersistentHttp2()akka.NotUsed> 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, managedPersistentHttp2WithPriorKnowledge()akka.NotUsed> Create a flow that when materialized creates a single HTTP/2 with 'prior knowledge' plaintext connection with a default port 80The 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
OutgoingConnectionBuilder toJava()INTERNAL API- Returns:
- (undocumented)
-
toPort
Change with port flows built with this builder connects to, if not set the protocol default is used.- Parameters:
port
- (undocumented)- Returns:
- (undocumented)
-
withClientConnectionSettings
Use customClientConnectionSettings
for the connection.- Parameters:
settings
- (undocumented)- Returns:
- (undocumented)
-
withCustomHttpsConnectionContext
OutgoingConnectionBuilder withCustomHttpsConnectionContext(HttpsConnectionContext httpsConnectionContext) Use a customHttpsConnectionContext
for the connection. Only applicable forhttps()
andhttp2()
, overridesdefaultHttpsContext
- Parameters:
httpsConnectionContext
- (undocumented)- Returns:
- (undocumented)
-