Class ClientTransport
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract org.apache.pekko.stream.javadsl.Flow<org.apache.pekko.util.ByteString,org.apache.pekko.util.ByteString, CompletionStage<OutgoingConnection>> connectTo(String host, int port, ClientConnectionSettings settings, org.apache.pekko.actor.ActorSystem system) static ClientTransportfromScala(ClientTransport scalaTransport) static ClientTransporthttpsProxy(InetSocketAddress proxyAddress) Returns aClientTransportthat runs all connection through the given HTTP(S) proxy using the HTTP CONNECT method.static ClientTransporthttpsProxy(InetSocketAddress proxyAddress, HttpCredentials proxyCredentials) Returns aClientTransportthat runs all connection through the given HTTP(S) proxy using the HTTP CONNECT method.static ClientTransporthttpsProxy(org.apache.pekko.actor.ActorSystem system) Returns aClientTransportthat runs all connection through the given HTTP(S) proxy using the HTTP CONNECT method.static ClientTransporthttpsProxy(HttpCredentials proxyCredentials, org.apache.pekko.actor.ActorSystem system) Returns aClientTransportthat runs all connection through the given HTTP(S) proxy using the HTTP CONNECT method.static ClientTransportTCP()static ClientTransporttoScala(ClientTransport javaTransport) static ClientTransportReturns aClientTransportthat allows to customize host name resolution.
- 
Constructor Details- 
ClientTransportpublic ClientTransport()
 
- 
- 
Method Details- 
TCP
- 
httpsProxyReturns aClientTransportthat runs all connection through the given HTTP(S) proxy using the HTTP CONNECT method.An HTTP(S) proxy is a proxy that will create one TCP connection to the HTTP(S) proxy for each target connection. The proxy transparently forwards the TCP connection to the target host. For more information about HTTP CONNECT tunnelling see https://tools.ietf.org/html/rfc7231#section-4.3.6. - Parameters:
- proxyAddress- (undocumented)
- Returns:
- (undocumented)
 
- 
httpsProxyReturns aClientTransportthat runs all connection through the given HTTP(S) proxy using the HTTP CONNECT method.Pulls the host/port pair from the application.conf: pekko.client.proxy.https.{host, port} - Parameters:
- system- (undocumented)
- Returns:
- (undocumented)
 
- 
httpsProxypublic static ClientTransport httpsProxy(InetSocketAddress proxyAddress, HttpCredentials proxyCredentials) Returns aClientTransportthat runs all connection through the given HTTP(S) proxy using the HTTP CONNECT method. This call also takesHttpCredentialsto base proxy credentials along with the request.An HTTP(S) proxy is a proxy that will create one TCP connection to the HTTP(S) proxy for each target connection. The proxy transparently forwards the TCP connection to the target host. For more information about HTTP CONNECT tunnelling see https://tools.ietf.org/html/rfc7231#section-4.3.6. - Parameters:
- proxyAddress- (undocumented)
- proxyCredentials- (undocumented)
- Returns:
- (undocumented)
 
- 
httpsProxypublic static ClientTransport httpsProxy(HttpCredentials proxyCredentials, org.apache.pekko.actor.ActorSystem system) Returns aClientTransportthat runs all connection through the given HTTP(S) proxy using the HTTP CONNECT method. This method also takesHttpCredentialsin order to pass along to the proxy.Pulls the host/port pair from the application.conf: pekko.client.proxy.https.{host, port} - Parameters:
- proxyCredentials- (undocumented)
- system- (undocumented)
- Returns:
- (undocumented)
 
- 
withCustomResolverpublic static ClientTransport withCustomResolver(BiFunction<String, Object, CompletionStage<InetSocketAddress>> lookup) Returns aClientTransportthat allows to customize host name resolution.- Parameters:
- lookup- A function that will be called with hostname and port and that should (potentially asynchronously resolve the given host/port to an- InetSocketAddress
- Returns:
- (undocumented)
 
- 
fromScala
- 
toScala
- 
connectTopublic abstract org.apache.pekko.stream.javadsl.Flow<org.apache.pekko.util.ByteString,org.apache.pekko.util.ByteString, connectToCompletionStage<OutgoingConnection>> (String host, int port, ClientConnectionSettings settings, org.apache.pekko.actor.ActorSystem system) 
 
-