Class SlotState
- java.lang.Object
-
- akka.http.impl.engine.client.pool.SlotState
-
- All Implemented Interfaces:
scala.Equals,scala.Product
- Direct Known Subclasses:
SlotState.ConnectedState,SlotState.Embargoed,SlotState.OutOfEmbargo$,SlotState.ShouldCloseConnectionState,SlotState.Unconnected$
public abstract class SlotState extends java.lang.Object implements scala.Product
-
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description SlotState()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description SlotStateidle(SlotContext ctx)protected SlotStateillegalState(SlotContext ctx, java.lang.String what)abstract booleanisConnected()abstract booleanisIdle()java.lang.Stringname()SlotStateonConnectionAttemptFailed(SlotContext ctx, java.lang.Throwable cause)SlotStateonConnectionAttemptSucceeded(SlotContext ctx, Http.OutgoingConnection outgoingConnection)SlotStateonConnectionCompleted(SlotContext ctx)SlotStateonConnectionFailed(SlotContext ctx, java.lang.Throwable cause)SlotStateonNewConnectionEmbargo(SlotContext ctx, scala.concurrent.duration.FiniteDuration embargoDuration)SlotStateonNewRequest(SlotContext ctx, PoolFlow.RequestContext requestContext)SlotStateonPreConnect(SlotContext ctx)SlotStateonRequestDispatched(SlotContext ctx)SlotStateonRequestEntityCompleted(SlotContext ctx)Will be called either immediately if the request entity is strict or otherwise laterSlotStateonRequestEntityFailed(SlotContext ctx, java.lang.Throwable cause)SlotStateonResponseDispatchable(SlotContext ctx)Called when the response out port is ready to receive a further response (successful or failed)SlotStateonResponseEntityCompleted(SlotContext ctx)Will be called either immediately if the response entity is strict or otherwise laterSlotStateonResponseEntityFailed(SlotContext ctx, java.lang.Throwable cause)SlotStateonResponseEntitySubscribed(SlotContext ctx)SlotStateonResponseReceived(SlotContext ctx, HttpResponse response)voidonShutdown(SlotContext ctx)SlotStateonTimeout(SlotContext ctx)scala.concurrent.duration.DurationstateTimeout()A slot can define a timeout for that state after which onTimeout will be called.
-
-
-
Method Detail
-
isIdle
public abstract boolean isIdle()
-
isConnected
public abstract boolean isConnected()
-
idle
public SlotState idle(SlotContext ctx)
-
onPreConnect
public SlotState onPreConnect(SlotContext ctx)
-
onConnectionAttemptSucceeded
public SlotState onConnectionAttemptSucceeded(SlotContext ctx, Http.OutgoingConnection outgoingConnection)
-
onConnectionAttemptFailed
public SlotState onConnectionAttemptFailed(SlotContext ctx, java.lang.Throwable cause)
-
onNewConnectionEmbargo
public SlotState onNewConnectionEmbargo(SlotContext ctx, scala.concurrent.duration.FiniteDuration embargoDuration)
-
onNewRequest
public SlotState onNewRequest(SlotContext ctx, PoolFlow.RequestContext requestContext)
-
onRequestDispatched
public SlotState onRequestDispatched(SlotContext ctx)
-
onRequestEntityCompleted
public SlotState onRequestEntityCompleted(SlotContext ctx)
Will be called either immediately if the request entity is strict or otherwise later
-
onRequestEntityFailed
public SlotState onRequestEntityFailed(SlotContext ctx, java.lang.Throwable cause)
-
onResponseReceived
public SlotState onResponseReceived(SlotContext ctx, HttpResponse response)
-
onResponseDispatchable
public SlotState onResponseDispatchable(SlotContext ctx)
Called when the response out port is ready to receive a further response (successful or failed)
-
onResponseEntitySubscribed
public SlotState onResponseEntitySubscribed(SlotContext ctx)
-
onResponseEntityCompleted
public SlotState onResponseEntityCompleted(SlotContext ctx)
Will be called either immediately if the response entity is strict or otherwise later
-
onResponseEntityFailed
public SlotState onResponseEntityFailed(SlotContext ctx, java.lang.Throwable cause)
-
onConnectionCompleted
public SlotState onConnectionCompleted(SlotContext ctx)
-
onConnectionFailed
public SlotState onConnectionFailed(SlotContext ctx, java.lang.Throwable cause)
-
onTimeout
public SlotState onTimeout(SlotContext ctx)
-
onShutdown
public void onShutdown(SlotContext ctx)
-
stateTimeout
public scala.concurrent.duration.Duration stateTimeout()
A slot can define a timeout for that state after which onTimeout will be called.
-
illegalState
protected SlotState illegalState(SlotContext ctx, java.lang.String what)
-
name
public java.lang.String name()
-
-