Interface OutgoingConnectionBuilder
-
public interface OutgoingConnectionBuilderBuilder 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 usinghttp(),https(),http2()orhttp2WithPriorKnowledge().Not for user extension
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description akka.stream.javadsl.Flow<HttpRequest,HttpResponse,java.util.concurrent.CompletionStage<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.javadsl.Flow<HttpRequest,HttpResponse,java.util.concurrent.CompletionStage<OutgoingConnection>>http2()Create a flow that when materialized creates a single HTTP/2 TLS connection with a default port 443akka.stream.javadsl.Flow<HttpRequest,HttpResponse,java.util.concurrent.CompletionStage<OutgoingConnection>>http2WithPriorKnowledge()Create a flow that when materialized creates a single HTTP/2 with 'prior knowledge' plaintext connection with a default port 80akka.stream.javadsl.Flow<HttpRequest,HttpResponse,java.util.concurrent.CompletionStage<OutgoingConnection>>https()Create a flow that when materialized creates a single HTTP/1.1 TLS connection with a default port 443OutgoingConnectionBuilderlogTo(akka.event.LoggingAdapter logger)Use a custom loggerakka.stream.javadsl.Flow<HttpRequest,HttpResponse,akka.NotUsed>managedPersistentHttp2()Create a flow that when materialized creates a managed HTTP/2 TLS connection with a default port 443.akka.stream.javadsl.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 80OutgoingConnectionBuildertoHost(java.lang.String host)Change which host flows built with this builder connects toOutgoingConnectionBuildertoPort(int port)Change with port flows built with this builder connects to, if not set the protocol default is used.OutgoingConnectionBuilderwithClientConnectionSettings(ClientConnectionSettings settings)Use customClientConnectionSettingsfor the connection.OutgoingConnectionBuilderwithCustomHttpsConnectionContext(HttpsConnectionContext httpsConnectionContext)Use a customHttpsConnectionContextfor the connection.
-
-
-
Method Detail
-
http
akka.stream.javadsl.Flow<HttpRequest,HttpResponse,java.util.concurrent.CompletionStage<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.javadsl.Flow<HttpRequest,HttpResponse,java.util.concurrent.CompletionStage<OutgoingConnection>> http2()
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
RequestResponseAssociationwhich Akka HTTP will carry over to the corresponding response for a request.- Returns:
- (undocumented)
-
http2WithPriorKnowledge
akka.stream.javadsl.Flow<HttpRequest,HttpResponse,java.util.concurrent.CompletionStage<OutgoingConnection>> http2WithPriorKnowledge()
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
RequestResponseAssociationwhich Akka HTTP will carry over to the corresponding response for a request.- Returns:
- (undocumented)
-
https
akka.stream.javadsl.Flow<HttpRequest,HttpResponse,java.util.concurrent.CompletionStage<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.javadsl.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
RequestResponseAssociationwhich Akka HTTP will carry over to the corresponding response for a request.- Returns:
- (undocumented)
-
managedPersistentHttp2WithPriorKnowledge
akka.stream.javadsl.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 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
RequestResponseAssociationwhich Akka HTTP will carry over to the corresponding response for a request.- Returns:
- (undocumented)
-
toHost
OutgoingConnectionBuilder toHost(java.lang.String host)
Change which host flows built with this builder connects to- Parameters:
host- (undocumented)- 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 customClientConnectionSettingsfor the connection.- Parameters:
settings- (undocumented)- Returns:
- (undocumented)
-
withCustomHttpsConnectionContext
OutgoingConnectionBuilder withCustomHttpsConnectionContext(HttpsConnectionContext httpsConnectionContext)
Use a customHttpsConnectionContextfor the connection. Only applicable forhttps()andhttp2(), overridesdefaultHttpsContext- Parameters:
httpsConnectionContext- (undocumented)- Returns:
- (undocumented)
-
-