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 SlotState
idle(SlotContext ctx)
protected SlotState
illegalState(SlotContext ctx, java.lang.String what)
abstract boolean
isConnected()
abstract boolean
isIdle()
java.lang.String
name()
SlotState
onConnectionAttemptFailed(SlotContext ctx, java.lang.Throwable cause)
SlotState
onConnectionAttemptSucceeded(SlotContext ctx, Http.OutgoingConnection outgoingConnection)
SlotState
onConnectionCompleted(SlotContext ctx)
SlotState
onConnectionFailed(SlotContext ctx, java.lang.Throwable cause)
SlotState
onNewConnectionEmbargo(SlotContext ctx, scala.concurrent.duration.FiniteDuration embargoDuration)
SlotState
onNewRequest(SlotContext ctx, PoolFlow.RequestContext requestContext)
SlotState
onPreConnect(SlotContext ctx)
SlotState
onRequestDispatched(SlotContext ctx)
SlotState
onRequestEntityCompleted(SlotContext ctx)
Will be called either immediately if the request entity is strict or otherwise laterSlotState
onRequestEntityFailed(SlotContext ctx, java.lang.Throwable cause)
SlotState
onResponseDispatchable(SlotContext ctx)
Called when the response out port is ready to receive a further response (successful or failed)SlotState
onResponseEntityCompleted(SlotContext ctx)
Will be called either immediately if the response entity is strict or otherwise laterSlotState
onResponseEntityFailed(SlotContext ctx, java.lang.Throwable cause)
SlotState
onResponseEntitySubscribed(SlotContext ctx)
SlotState
onResponseReceived(SlotContext ctx, HttpResponse response)
void
onShutdown(SlotContext ctx)
SlotState
onTimeout(SlotContext ctx)
scala.concurrent.duration.Duration
stateTimeout()
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()
-
-