Class Http

java.lang.Object
org.apache.pekko.http.javadsl.Http
All Implemented Interfaces:
org.apache.pekko.actor.Extension

public class Http extends Object implements org.apache.pekko.actor.Extension
  • Constructor Details

    • Http

      public Http(org.apache.pekko.actor.ExtendedActorSystem system)
  • Method Details

    • get

      public static Http get(org.apache.pekko.actor.ActorSystem system)
    • get

      public static Http get(org.apache.pekko.actor.ClassicActorSystemProvider system)
    • lookup

      public static Http$ lookup()
    • createExtension

      public static Http createExtension(org.apache.pekko.actor.ExtendedActorSystem system)
    • apply

      public static T apply(org.apache.pekko.actor.ActorSystem system)
    • apply

      public static T apply(org.apache.pekko.actor.ClassicActorSystemProvider system)
    • hashCode

      public static final int hashCode()
    • equals

      public static final boolean equals(Object other)
    • serverLayer

      public org.apache.pekko.stream.javadsl.BidiFlow<HttpResponse,org.apache.pekko.stream.TLSProtocol.SslTlsOutbound,org.apache.pekko.stream.TLSProtocol.SslTlsInbound,HttpRequest,org.apache.pekko.NotUsed> serverLayer()
      Constructs a server layer stage using the configured default pekko.http.javadsl.settings.ServerSettings. The returned pekko.stream.javadsl.BidiFlow isn't reusable and can only be materialized once.
      Returns:
      (undocumented)
    • serverLayer

      public org.apache.pekko.stream.javadsl.BidiFlow<HttpResponse,org.apache.pekko.stream.TLSProtocol.SslTlsOutbound,org.apache.pekko.stream.TLSProtocol.SslTlsInbound,HttpRequest,org.apache.pekko.NotUsed> serverLayer(ServerSettings settings)
      Constructs a server layer stage using the given pekko.http.javadsl.settings.ServerSettings. The returned pekko.stream.javadsl.BidiFlow isn't reusable and can only be materialized once.
      Parameters:
      settings - (undocumented)
      Returns:
      (undocumented)
    • serverLayer

      public org.apache.pekko.stream.javadsl.BidiFlow<HttpResponse,org.apache.pekko.stream.TLSProtocol.SslTlsOutbound,org.apache.pekko.stream.TLSProtocol.SslTlsInbound,HttpRequest,org.apache.pekko.NotUsed> serverLayer(ServerSettings settings, Optional<InetSocketAddress> remoteAddress)
      Constructs a server layer stage using the given pekko.http.javadsl.settings.ServerSettings. The returned pekko.stream.javadsl.BidiFlow isn't reusable and can only be materialized once.
      Parameters:
      settings - (undocumented)
      remoteAddress - (undocumented)
      Returns:
      (undocumented)
    • serverLayer

      public org.apache.pekko.stream.javadsl.BidiFlow<HttpResponse,org.apache.pekko.stream.TLSProtocol.SslTlsOutbound,org.apache.pekko.stream.TLSProtocol.SslTlsInbound,HttpRequest,org.apache.pekko.NotUsed> serverLayer(ServerSettings settings, Optional<InetSocketAddress> remoteAddress, org.apache.pekko.event.LoggingAdapter log)
      Constructs a server layer stage using the given ServerSettings. The returned pekko.stream.javadsl.BidiFlow isn't reusable and can only be materialized once.
      Parameters:
      settings - (undocumented)
      remoteAddress - (undocumented)
      log - (undocumented)
      Returns:
      (undocumented)
    • newServerAt

      public ServerBuilder newServerAt(String interface_, int port)
      Main entry point to create a server binding.

      Parameters:
      interface - The interface to bind to.
      port - The port to bind to or 0 if the port should be automatically assigned.
      interface_ - (undocumented)
      Returns:
      (undocumented)
    • clientLayer

      public org.apache.pekko.stream.javadsl.BidiFlow<HttpRequest,org.apache.pekko.stream.TLSProtocol.SslTlsOutbound,org.apache.pekko.stream.TLSProtocol.SslTlsInbound,HttpResponse,org.apache.pekko.NotUsed> clientLayer(Host hostHeader)
      Constructs a client layer stage using the configured default pekko.http.javadsl.settings.ClientConnectionSettings.
      Parameters:
      hostHeader - (undocumented)
      Returns:
      (undocumented)
    • clientLayer

      public org.apache.pekko.stream.javadsl.BidiFlow<HttpRequest,org.apache.pekko.stream.TLSProtocol.SslTlsOutbound,org.apache.pekko.stream.TLSProtocol.SslTlsInbound,HttpResponse,org.apache.pekko.NotUsed> clientLayer(Host hostHeader, ClientConnectionSettings settings)
      Constructs a client layer stage using the given pekko.http.javadsl.settings.ClientConnectionSettings.
      Parameters:
      hostHeader - (undocumented)
      settings - (undocumented)
      Returns:
      (undocumented)
    • clientLayer

      public org.apache.pekko.stream.javadsl.BidiFlow<HttpRequest,org.apache.pekko.stream.TLSProtocol.SslTlsOutbound,org.apache.pekko.stream.TLSProtocol.SslTlsInbound,HttpResponse,org.apache.pekko.NotUsed> clientLayer(Host hostHeader, ClientConnectionSettings settings, org.apache.pekko.event.LoggingAdapter log)
      Constructs a client layer stage using the given ClientConnectionSettings.
      Parameters:
      hostHeader - (undocumented)
      settings - (undocumented)
      log - (undocumented)
      Returns:
      (undocumented)
    • outgoingConnection

      public org.apache.pekko.stream.javadsl.Flow<HttpRequest,HttpResponse,CompletionStage<OutgoingConnection>> outgoingConnection(String host)
      Creates a pekko.stream.javadsl.Flow representing a prospective HTTP client connection to the given endpoint. Every materialization of the produced flow will attempt to establish a new outgoing connection.

      If the hostname is given with an https:// prefix, the default HttpsConnectionContext will be used.

      Prefer connectionTo(java.lang.String) over this method.

      Parameters:
      host - (undocumented)
      Returns:
      (undocumented)
    • outgoingConnection

      public org.apache.pekko.stream.javadsl.Flow<HttpRequest,HttpResponse,CompletionStage<OutgoingConnection>> outgoingConnection(ConnectHttp to)
      Creates a pekko.stream.javadsl.Flow representing a prospective HTTP client connection to the given endpoint. Every materialization of the produced flow will attempt to establish a new outgoing connection.

      Use the ConnectHttp DSL to configure target host and whether HTTPS should be used.

      Prefer connectionTo(java.lang.String) over this method.

      Parameters:
      to - (undocumented)
      Returns:
      (undocumented)
    • outgoingConnection

      public org.apache.pekko.stream.javadsl.Flow<HttpRequest,HttpResponse,CompletionStage<OutgoingConnection>> outgoingConnection(ConnectHttp to, Optional<InetSocketAddress> localAddress, ClientConnectionSettings settings, org.apache.pekko.event.LoggingAdapter log)
      Creates a pekko.stream.javadsl.Flow representing a prospective HTTP client connection to the given endpoint. Every materialization of the produced flow will attempt to establish a new outgoing connection.

      Prefer connectionTo(java.lang.String) over this method.

      Parameters:
      to - (undocumented)
      localAddress - (undocumented)
      settings - (undocumented)
      log - (undocumented)
      Returns:
      (undocumented)
    • connectionTo

      public OutgoingConnectionBuilder connectionTo(String host)
      Creates a builder which will create a single connection to a host every time the built flow is materialized. There is no pooling and you are yourself responsible for lifecycle management of the connection. For a more convenient Request level API see singleRequest()

      Parameters:
      host - (undocumented)
      Returns:
      A builder to configure more specific setup for the connection and then build a Flow&gt;Request, Response, CompletionStage&gt;OutgoingConnection>>.
    • newHostConnectionPool

      public <T> org.apache.pekko.stream.javadsl.Flow<org.apache.pekko.japi.Pair<HttpRequest,T>,org.apache.pekko.japi.Pair<scala.util.Try<HttpResponse>,T>,HostConnectionPool> newHostConnectionPool(String host, org.apache.pekko.stream.Materializer materializer)
      Starts a new connection pool to the given host and configuration and returns a pekko.stream.javadsl.Flow which dispatches the requests from all its materializations across this pool. While the started host connection pool internally shuts itself down automatically after the configured idle timeout it will spin itself up again if more requests arrive from an existing or a new client flow materialization. The returned flow therefore remains usable for the full lifetime of the application.

      Since the underlying transport usually comprises more than a single connection the produced flow might generate responses in an order that doesn't directly match the consumed requests. For example, if two requests A and B enter the flow in that order the response for B might be produced before the response for A. In order to allow for easy response-to-request association the flow takes in a custom, opaque context object of type T from the application which is emitted together with the corresponding response.

      Parameters:
      host - (undocumented)
      materializer - (undocumented)
      Returns:
      (undocumented)
    • newHostConnectionPool

      public <T> org.apache.pekko.stream.javadsl.Flow<org.apache.pekko.japi.Pair<HttpRequest,T>,org.apache.pekko.japi.Pair<scala.util.Try<HttpResponse>,T>,HostConnectionPool> newHostConnectionPool(ConnectHttp to, org.apache.pekko.stream.Materializer materializer)
      Starts a new connection pool to the given host and configuration and returns a pekko.stream.javadsl.Flow which dispatches the requests from all its materializations across this pool. While the started host connection pool internally shuts itself down automatically after the configured idle timeout it will spin itself up again if more requests arrive from an existing or a new client flow materialization. The returned flow therefore remains usable for the full lifetime of the application.

      Since the underlying transport usually comprises more than a single connection the produced flow might generate responses in an order that doesn't directly match the consumed requests. For example, if two requests A and B enter the flow in that order the response for B might be produced before the response for A. In order to allow for easy response-to-request association the flow takes in a custom, opaque context object of type T from the application which is emitted together with the corresponding response.

      Parameters:
      to - (undocumented)
      materializer - (undocumented)
      Returns:
      (undocumented)
    • newHostConnectionPool

      public <T> org.apache.pekko.stream.javadsl.Flow<org.apache.pekko.japi.Pair<HttpRequest,T>,org.apache.pekko.japi.Pair<scala.util.Try<HttpResponse>,T>,HostConnectionPool> newHostConnectionPool(ConnectHttp to, ConnectionPoolSettings settings, org.apache.pekko.event.LoggingAdapter log, org.apache.pekko.stream.Materializer materializer)
      Same as <T>newHostConnectionPool(java.lang.String,org.apache.pekko.stream.Materializer) but with HTTPS encryption.

      The given ConnectionContext will be used for encryption on the connection.

      Parameters:
      to - (undocumented)
      settings - (undocumented)
      log - (undocumented)
      materializer - (undocumented)
      Returns:
      (undocumented)
    • cachedHostConnectionPool

      public <T> org.apache.pekko.stream.javadsl.Flow<org.apache.pekko.japi.Pair<HttpRequest,T>,org.apache.pekko.japi.Pair<scala.util.Try<HttpResponse>,T>,HostConnectionPool> cachedHostConnectionPool(String host)
      Returns a pekko.stream.javadsl.Flow which dispatches incoming HTTP requests to the per-ActorSystem pool of outgoing HTTP connections to the given target host endpoint. For every ActorSystem, target host and pool configuration a separate connection pool is maintained. The HTTP layer transparently manages idle shutdown and restarting of connections pools as configured. The returned pekko.stream.javadsl.Flow instances therefore remain valid throughout the lifetime of the application.

      The internal caching logic guarantees that there will never be more than a single pool running for the given target host endpoint and configuration (in this ActorSystem).

      Since the underlying transport usually comprises more than a single connection the produced flow might generate responses in an order that doesn't directly match the consumed requests. For example, if two requests A and B enter the flow in that order the response for B might be produced before the response for A. In order to allow for easy response-to-request association the flow takes in a custom, opaque context object of type T from the application which is emitted together with the corresponding response.

      Parameters:
      host - (undocumented)
      Returns:
      (undocumented)
    • cachedHostConnectionPool

      public <T> org.apache.pekko.stream.javadsl.Flow<org.apache.pekko.japi.Pair<HttpRequest,T>,org.apache.pekko.japi.Pair<scala.util.Try<HttpResponse>,T>,HostConnectionPool> cachedHostConnectionPool(ConnectHttp to)
      Returns a pekko.stream.javadsl.Flow which dispatches incoming HTTP requests to the per-ActorSystem pool of outgoing HTTP connections to the given target host endpoint. For every ActorSystem, target host and pool configuration a separate connection pool is maintained. The HTTP layer transparently manages idle shutdown and restarting of connections pools as configured. The returned pekko.stream.javadsl.Flow instances therefore remain valid throughout the lifetime of the application.

      The internal caching logic guarantees that there will never be more than a single pool running for the given target host endpoint and configuration (in this ActorSystem).

      Since the underlying transport usually comprises more than a single connection the produced flow might generate responses in an order that doesn't directly match the consumed requests. For example, if two requests A and B enter the flow in that order the response for B might be produced before the response for A. In order to allow for easy response-to-request association the flow takes in a custom, opaque context object of type T from the application which is emitted together with the corresponding response.

      Parameters:
      to - (undocumented)
      Returns:
      (undocumented)
    • cachedHostConnectionPool

      public <T> org.apache.pekko.stream.javadsl.Flow<org.apache.pekko.japi.Pair<HttpRequest,T>,org.apache.pekko.japi.Pair<scala.util.Try<HttpResponse>,T>,HostConnectionPool> cachedHostConnectionPool(ConnectHttp to, ConnectionPoolSettings settings, org.apache.pekko.event.LoggingAdapter log)
      Returns a pekko.stream.javadsl.Flow which dispatches incoming HTTP requests to the per-ActorSystem pool of outgoing HTTP connections to the given target host endpoint. For every ActorSystem, target host and pool configuration a separate connection pool is maintained. The HTTP layer transparently manages idle shutdown and restarting of connections pools as configured. The returned pekko.stream.javadsl.Flow instances therefore remain valid throughout the lifetime of the application.

      The internal caching logic guarantees that there will never be more than a single pool running for the given target host endpoint and configuration (in this ActorSystem).

      Since the underlying transport usually comprises more than a single connection the produced flow might generate responses in an order that doesn't directly match the consumed requests. For example, if two requests A and B enter the flow in that order the response for B might be produced before the response for A. In order to allow for easy response-to-request association the flow takes in a custom, opaque context object of type T from the application which is emitted together with the corresponding response.

      To configure additional settings for the pool (and requests made using it), use the pekko.http.host-connection-pool config section or pass in a ConnectionPoolSettings explicitly.

      Parameters:
      to - (undocumented)
      settings - (undocumented)
      log - (undocumented)
      Returns:
      (undocumented)
    • cachedHostConnectionPoolHttps

      public <T> org.apache.pekko.stream.javadsl.Flow<org.apache.pekko.japi.Pair<HttpRequest,T>,org.apache.pekko.japi.Pair<scala.util.Try<HttpResponse>,T>,HostConnectionPool> cachedHostConnectionPoolHttps(ConnectHttp to, ConnectionPoolSettings settings, org.apache.pekko.event.LoggingAdapter log)
      Same as <T>cachedHostConnectionPool(java.lang.String) but with HTTPS encryption.

      When an HttpConnectionContext is defined in the given ConnectHttp it will be used, otherwise the default client-side context will be used.

      Parameters:
      to - (undocumented)
      settings - (undocumented)
      log - (undocumented)
      Returns:
      (undocumented)
    • cachedHostConnectionPoolHttps

      public <T> org.apache.pekko.stream.javadsl.Flow<org.apache.pekko.japi.Pair<HttpRequest,T>,org.apache.pekko.japi.Pair<scala.util.Try<HttpResponse>,T>,HostConnectionPool> cachedHostConnectionPoolHttps(ConnectHttp to)
      Same as <T>cachedHostConnectionPool(java.lang.String) but with HTTPS encryption.

      When an HttpConnectionContext is defined in the given ConnectHttp it will be used, otherwise the default client-side context will be used.

      Parameters:
      to - (undocumented)
      Returns:
      (undocumented)
    • superPool

      public <T> org.apache.pekko.stream.javadsl.Flow<org.apache.pekko.japi.Pair<HttpRequest,T>,org.apache.pekko.japi.Pair<scala.util.Try<HttpResponse>,T>,org.apache.pekko.NotUsed> superPool()
      Creates a new "super connection pool flow", which routes incoming requests to a (cached) host connection pool depending on their respective effective URIs. Note that incoming requests must have either an absolute URI or a valid Host header.

      Since the underlying transport usually comprises more than a single connection the produced flow might generate responses in an order that doesn't directly match the consumed requests. For example, if two requests A and B enter the flow in that order the response for B might be produced before the response for A. In order to allow for easy response-to-request association the flow takes in a custom, opaque context object of type T from the application which is emitted together with the corresponding response.

      Returns:
      (undocumented)
    • superPool

      public <T> org.apache.pekko.stream.javadsl.Flow<org.apache.pekko.japi.Pair<HttpRequest,T>,org.apache.pekko.japi.Pair<scala.util.Try<HttpResponse>,T>,org.apache.pekko.NotUsed> superPool(ConnectionPoolSettings settings, HttpsConnectionContext connectionContext, org.apache.pekko.event.LoggingAdapter log)
      Creates a new "super connection pool flow", which routes incoming requests to a (cached) host connection pool depending on their respective effective URIs. Note that incoming requests must have either an absolute URI or a valid Host header.

      The given HttpsConnectionContext is used to configure TLS for the connection.

      Since the underlying transport usually comprises more than a single connection the produced flow might generate responses in an order that doesn't directly match the consumed requests. For example, if two requests A and B enter the flow in that order the response for B might be produced before the response for A.

      In order to allow for easy response-to-request association the flow takes in a custom, opaque context object of type T from the application which is emitted together with the corresponding response.

      Parameters:
      settings - (undocumented)
      connectionContext - (undocumented)
      log - (undocumented)
      Returns:
      (undocumented)
    • superPool

      public <T> org.apache.pekko.stream.javadsl.Flow<org.apache.pekko.japi.Pair<HttpRequest,T>,org.apache.pekko.japi.Pair<scala.util.Try<HttpResponse>,T>,org.apache.pekko.NotUsed> superPool(ConnectionPoolSettings settings, org.apache.pekko.event.LoggingAdapter log)
      Creates a new "super connection pool flow", which routes incoming requests to a (cached) host connection pool depending on their respective effective URIs. Note that incoming requests must have either an absolute URI or a valid Host header.

      The defaultClientHttpsContext() is used to configure TLS for the connection.

      Since the underlying transport usually comprises more than a single connection the produced flow might generate responses in an order that doesn't directly match the consumed requests. For example, if two requests A and B enter the flow in that order the response for B might be produced before the response for A.

      In order to allow for easy response-to-request association the flow takes in a custom, opaque context object of type T from the application which is emitted together with the corresponding response.

      Parameters:
      settings - (undocumented)
      log - (undocumented)
      Returns:
      (undocumented)
    • singleRequest

      public CompletionStage<HttpResponse> singleRequest(HttpRequest request)
      Fires a single HttpRequest across the (cached) host connection pool for the request's effective URI to produce a response future.

      The defaultClientHttpsContext() is used to configure TLS for the connection.

      Note that the request must have either an absolute URI or a valid Host header, otherwise the future will be completed with an error.

      Parameters:
      request - (undocumented)
      Returns:
      (undocumented)
    • singleRequest

      public CompletionStage<HttpResponse> singleRequest(HttpRequest request, HttpsConnectionContext connectionContext)
      Fires a single HttpRequest across the (cached) host connection pool for the request's effective URI to produce a response future.

      The defaultClientHttpsContext() is used to configure TLS for the connection.

      Note that the request must have either an absolute URI or a valid Host header, otherwise the future will be completed with an error.

      Parameters:
      request - (undocumented)
      connectionContext - (undocumented)
      Returns:
      (undocumented)
    • singleRequest

      public CompletionStage<HttpResponse> singleRequest(HttpRequest request, HttpsConnectionContext connectionContext, ConnectionPoolSettings settings, org.apache.pekko.event.LoggingAdapter log)
      Fires a single HttpRequest across the (cached) host connection pool for the request's effective URI to produce a response future.

      The given HttpsConnectionContext will be used for encryption if the request is sent to an https endpoint.

      Note that the request must have either an absolute URI or a valid Host header, otherwise the future will be completed with an error.

      Parameters:
      request - (undocumented)
      connectionContext - (undocumented)
      settings - (undocumented)
      log - (undocumented)
      Returns:
      (undocumented)
    • webSocketClientLayer

      public org.apache.pekko.stream.javadsl.BidiFlow<Message,org.apache.pekko.stream.TLSProtocol.SslTlsOutbound,org.apache.pekko.stream.TLSProtocol.SslTlsInbound,Message,CompletionStage<WebSocketUpgradeResponse>> webSocketClientLayer(WebSocketRequest request)
      Constructs a WebSocket pekko.stream.javadsl.BidiFlow.

      The layer is not reusable and must only be materialized once.

      Parameters:
      request - (undocumented)
      Returns:
      (undocumented)
    • webSocketClientLayer

      public org.apache.pekko.stream.javadsl.BidiFlow<Message,org.apache.pekko.stream.TLSProtocol.SslTlsOutbound,org.apache.pekko.stream.TLSProtocol.SslTlsInbound,Message,CompletionStage<WebSocketUpgradeResponse>> webSocketClientLayer(WebSocketRequest request, ClientConnectionSettings settings)
      Constructs a WebSocket pekko.stream.javadsl.BidiFlow using the configured default ClientConnectionSettings, configured using the pekko.http.client config section.

      The layer is not reusable and must only be materialized once.

      Parameters:
      request - (undocumented)
      settings - (undocumented)
      Returns:
      (undocumented)
    • webSocketClientLayer

      public org.apache.pekko.stream.javadsl.BidiFlow<Message,org.apache.pekko.stream.TLSProtocol.SslTlsOutbound,org.apache.pekko.stream.TLSProtocol.SslTlsInbound,Message,CompletionStage<WebSocketUpgradeResponse>> webSocketClientLayer(WebSocketRequest request, ClientConnectionSettings settings, org.apache.pekko.event.LoggingAdapter log)
      Constructs a WebSocket pekko.stream.javadsl.BidiFlow using the configured default ClientConnectionSettings, configured using the pekko.http.client config section.

      The layer is not reusable and must only be materialized once.

      Parameters:
      request - (undocumented)
      settings - (undocumented)
      log - (undocumented)
      Returns:
      (undocumented)
    • webSocketClientFlow

      public org.apache.pekko.stream.javadsl.Flow<Message,Message,CompletionStage<WebSocketUpgradeResponse>> webSocketClientFlow(WebSocketRequest request)
      Constructs a flow that once materialized establishes a WebSocket connection to the given Uri.

      The layer is not reusable and must only be materialized once.

      Parameters:
      request - (undocumented)
      Returns:
      (undocumented)
    • webSocketClientFlow

      public org.apache.pekko.stream.javadsl.Flow<Message,Message,CompletionStage<WebSocketUpgradeResponse>> webSocketClientFlow(WebSocketRequest request, ConnectionContext connectionContext, Optional<InetSocketAddress> localAddress, ClientConnectionSettings settings, org.apache.pekko.event.LoggingAdapter log)
      Constructs a flow that once materialized establishes a WebSocket connection to the given Uri.

      The layer is not reusable and must only be materialized once.

      Parameters:
      request - (undocumented)
      connectionContext - (undocumented)
      localAddress - (undocumented)
      settings - (undocumented)
      log - (undocumented)
      Returns:
      (undocumented)
    • singleWebSocketRequest

      public <T> org.apache.pekko.japi.Pair<CompletionStage<WebSocketUpgradeResponse>,T> singleWebSocketRequest(WebSocketRequest request, org.apache.pekko.stream.javadsl.Flow<Message,Message,T> clientFlow, org.apache.pekko.stream.Materializer materializer)
      Runs a single WebSocket conversation given a Uri and a flow that represents the client side of the WebSocket conversation.

      The defaultClientHttpsContext() is used to configure TLS for the connection.

      Parameters:
      request - (undocumented)
      clientFlow - (undocumented)
      materializer - (undocumented)
      Returns:
      (undocumented)
    • singleWebSocketRequest

      public <T> org.apache.pekko.japi.Pair<CompletionStage<WebSocketUpgradeResponse>,T> singleWebSocketRequest(WebSocketRequest request, org.apache.pekko.stream.javadsl.Flow<Message,Message,T> clientFlow, ConnectionContext connectionContext, org.apache.pekko.stream.Materializer materializer)
      Runs a single WebSocket conversation given a Uri and a flow that represents the client side of the WebSocket conversation.

      The defaultClientHttpsContext() is used to configure TLS for the connection.

      Parameters:
      request - (undocumented)
      clientFlow - (undocumented)
      connectionContext - (undocumented)
      materializer - (undocumented)
      Returns:
      (undocumented)
    • singleWebSocketRequest

      public <T> org.apache.pekko.japi.Pair<CompletionStage<WebSocketUpgradeResponse>,T> singleWebSocketRequest(WebSocketRequest request, org.apache.pekko.stream.javadsl.Flow<Message,Message,T> clientFlow, ConnectionContext connectionContext, Optional<InetSocketAddress> localAddress, ClientConnectionSettings settings, org.apache.pekko.event.LoggingAdapter log, org.apache.pekko.stream.Materializer materializer)
      Runs a single WebSocket conversation given a Uri and a flow that represents the client side of the WebSocket conversation.
      Parameters:
      request - (undocumented)
      clientFlow - (undocumented)
      connectionContext - (undocumented)
      localAddress - (undocumented)
      settings - (undocumented)
      log - (undocumented)
      materializer - (undocumented)
      Returns:
      (undocumented)
    • shutdownAllConnectionPools

      public CompletionStage<scala.runtime.BoxedUnit> shutdownAllConnectionPools()
      Triggers an orderly shutdown of all host connections pools currently maintained by the pekko.actor.ActorSystem. The returned future is completed when all pools that were live at the time of this method call have completed their shutdown process.

      If existing pool client flows are re-used or new ones materialized concurrently with or after this method call the respective connection pools will be restarted and not contribute to the returned future.

      Returns:
      (undocumented)
    • defaultClientHttpsContext

      public HttpsConnectionContext defaultClientHttpsContext()
      Gets the current default client-side ConnectionContext.
      Returns:
      (undocumented)
    • setDefaultClientHttpsContext

      public void setDefaultClientHttpsContext(HttpsConnectionContext context)
      Sets the default client-side ConnectionContext.
      Parameters:
      context - (undocumented)