public interface OutgoingConnectionBuilder
http()
, https()
, http2()
or http2WithPriorKnowledge()
.
Not for user extension
Modifier and Type | Method and Description |
---|---|
org.apache.pekko.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.
|
org.apache.pekko.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
pekko.http.scaladsl.model.RequestResponseAssociation
which Pekko HTTP will carry over to the corresponding response for a request. |
org.apache.pekko.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
pekko.http.scaladsl.model.RequestResponseAssociation
which Pekko HTTP will carry over to the corresponding response for a request. |
org.apache.pekko.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
|
OutgoingConnectionBuilder |
logTo(org.apache.pekko.event.LoggingAdapter logger)
Use a custom logger
|
org.apache.pekko.stream.scaladsl.Flow<HttpRequest,HttpResponse,org.apache.pekko.NotUsed> |
managedPersistentHttp2()
Create a flow that when materialized creates a managed HTTP/2 TLS connection with a default port 443.
|
org.apache.pekko.stream.scaladsl.Flow<HttpRequest,HttpResponse,org.apache.pekko.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.
|
OutgoingConnectionBuilder |
toHost(java.lang.String host)
Change which host flows built with this builder connects to
|
OutgoingConnectionBuilder |
toJava()
INTERNAL API
|
OutgoingConnectionBuilder |
toPort(int port)
Change with port flows built with this builder connects to, if not set
the protocol default is used.
|
OutgoingConnectionBuilder |
withClientConnectionSettings(ClientConnectionSettings settings)
Use custom
ClientConnectionSettings for the connection. |
OutgoingConnectionBuilder |
withCustomHttpsConnectionContext(HttpsConnectionContext httpsConnectionContext)
Use a custom
HttpsConnectionContext for the connection. |
org.apache.pekko.stream.scaladsl.Flow<HttpRequest,HttpResponse,scala.concurrent.Future<Http.OutgoingConnection>> http()
org.apache.pekko.stream.scaladsl.Flow<HttpRequest,HttpResponse,scala.concurrent.Future<Http.OutgoingConnection>> http2()
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 pekko.http.scaladsl.model.RequestResponseAssociation
which Pekko HTTP will carry over to the corresponding response for a request.
org.apache.pekko.stream.scaladsl.Flow<HttpRequest,HttpResponse,scala.concurrent.Future<Http.OutgoingConnection>> http2WithPriorKnowledge()
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 pekko.http.scaladsl.model.RequestResponseAssociation
which Pekko HTTP will carry over to the corresponding response for a request.
org.apache.pekko.stream.scaladsl.Flow<HttpRequest,HttpResponse,scala.concurrent.Future<Http.OutgoingConnection>> https()
OutgoingConnectionBuilder logTo(org.apache.pekko.event.LoggingAdapter logger)
logger
- (undocumented)org.apache.pekko.stream.scaladsl.Flow<HttpRequest,HttpResponse,org.apache.pekko.NotUsed> managedPersistentHttp2()
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 pekko.http.scaladsl.model.RequestResponseAssociation
which Pekko HTTP will carry over to the corresponding response for a request.
org.apache.pekko.stream.scaladsl.Flow<HttpRequest,HttpResponse,org.apache.pekko.NotUsed> managedPersistentHttp2WithPriorKnowledge()
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 pekko.http.scaladsl.model.RequestResponseAssociation
which Pekko HTTP will carry over to the corresponding response for a request.
OutgoingConnectionBuilder toHost(java.lang.String host)
host
- (undocumented)OutgoingConnectionBuilder toJava()
OutgoingConnectionBuilder toPort(int port)
port
- (undocumented)OutgoingConnectionBuilder withClientConnectionSettings(ClientConnectionSettings settings)
ClientConnectionSettings
for the connection.settings
- (undocumented)OutgoingConnectionBuilder withCustomHttpsConnectionContext(HttpsConnectionContext httpsConnectionContext)
HttpsConnectionContext
for the connection.
Only applicable for https()
and http2()
, overrides defaultHttpsContext
httpsConnectionContext
- (undocumented)