public final class PoolGateway
extends java.lang.Object
PoolMasterActor
A PoolGateway
is represented by its HostConnectionPoolSetup
and its PoolGateway.GatewayIdentifier
. If the later
is SharedGateway
, it means that a shared pool must be used for this particular HostConnectionPoolSetup
.
Modifier and Type | Class and Description |
---|---|
static interface |
PoolGateway.GatewayIdentifier |
static class |
PoolGateway.SharedGateway$ |
static class |
PoolGateway.UniqueGateway |
static class |
PoolGateway.UniqueGateway$ |
Constructor and Description |
---|
PoolGateway(akka.actor.ActorRef gatewayRef,
HostConnectionPoolSetup hcps,
PoolGateway.GatewayIdentifier gatewayId,
akka.stream.Materializer fm) |
Modifier and Type | Method and Description |
---|---|
scala.concurrent.Future<HttpResponse> |
apply(HttpRequest request)
Send a request through the corresponding pool.
|
boolean |
equals(java.lang.Object that) |
PoolGateway.GatewayIdentifier |
gatewayId() |
int |
hashCode() |
HostConnectionPoolSetup |
hcps() |
static PoolGateway.UniqueGateway |
newUniqueGatewayIdentifier() |
scala.concurrent.Future<scala.Option<PoolMasterActor.PoolInterfaceStatus>> |
poolStatus() |
scala.concurrent.Future<akka.Done> |
shutdown()
Shutdown the corresponding pool and signal its termination.
|
PoolGateway |
startPool()
Start the corresponding pool to make it ready to serve requests.
|
java.lang.String |
toString() |
public PoolGateway(akka.actor.ActorRef gatewayRef, HostConnectionPoolSetup hcps, PoolGateway.GatewayIdentifier gatewayId, akka.stream.Materializer fm)
public static PoolGateway.UniqueGateway newUniqueGatewayIdentifier()
public HostConnectionPoolSetup hcps()
public PoolGateway.GatewayIdentifier gatewayId()
public scala.concurrent.Future<HttpResponse> apply(HttpRequest request)
request
- the requestpublic PoolGateway startPool()
public scala.concurrent.Future<akka.Done> shutdown()
The shutdown will wait for all ongoing requests to be completed.
public java.lang.String toString()
toString
in class java.lang.Object
public scala.concurrent.Future<scala.Option<PoolMasterActor.PoolInterfaceStatus>> poolStatus()
public boolean equals(java.lang.Object that)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object