Package akka.http.impl.engine.client
Class PoolMaster
java.lang.Object
akka.http.impl.engine.client.PoolMaster
INTERNAL API
API for accessing the global pool master actor.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PoolMaster
apply
(akka.actor.ExtendedActorSystem system) scala.concurrent.Future<HttpResponse>
dispatchRequest
(PoolId poolId, HttpRequest request, akka.stream.Materializer fm) Send a request through the corresponding pool.scala.concurrent.Future<Object>
poolSize()
For testing onlyakka.actor.ActorRef
ref()
scala.concurrent.Future<akka.Done>
Shutdown the corresponding pool and signal its termination.scala.concurrent.Future<akka.Done>
Triggers an orderly shutdown of all host connections pools currently maintained by theActorSystem
.void
Start the corresponding pool to make it ready to serve requests.
-
Constructor Details
-
PoolMaster
public PoolMaster(akka.actor.ActorRef ref)
-
-
Method Details
-
apply
-
ref
public akka.actor.ActorRef ref() -
dispatchRequest
public scala.concurrent.Future<HttpResponse> dispatchRequest(PoolId poolId, HttpRequest request, akka.stream.Materializer fm) Send a request through the corresponding pool. If the pool is not running, it will be started automatically. If it is shutting down, it will restart as soon as the shutdown operation is complete and serve this request.- Parameters:
request
- the requestpoolId
- (undocumented)fm
- (undocumented)- Returns:
- the response
-
startPool
Start the corresponding pool to make it ready to serve requests. If the pool is already started, this does nothing. If it is being shutdown, it will restart as soon as the shutdown operation is complete.- Parameters:
poolId
- (undocumented)fm
- (undocumented)
-
shutdown
Shutdown the corresponding pool and signal its termination. If the pool is not running or is being shutting down, this does nothing.The shutdown will wait for all ongoing requests to be completed.
- Parameters:
poolId
- (undocumented)- Returns:
- a Future completed when the pool has been shutdown.
-
shutdownAll
public scala.concurrent.Future<akka.Done> shutdownAll()Triggers an orderly shutdown of all host connections pools currently maintained by theActorSystem
. 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)
-
poolSize
For testing only- Returns:
- (undocumented)
-