Top Description Inners Methods
org.apache.hc.client5.http.async

public Interface AsyncExecChain

Annotations
@Contract
threading:STATELESS
Imports
java.io.IOException, java.util.concurrent.atomic.AtomicInteger, org.apache.hc.client5.http.HttpRoute, org.apache.hc.client5.http.protocol.HttpClientContext, org.apache.hc.core5.annotation.Contract, .Internal, .ThreadingBehavior, org.apache.hc.core5.concurrent.CancellableDependency, org.apache.hc.core5.http.HttpException, .HttpRequest, org.apache.hc.core5.http.nio.AsyncEntityProducer, org.apache.hc.core5.util.Args, .TimeValue

Represents a single element in the client side asynchronous request execution chain.
Since
5.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
AsyncExecChain.Scheduler

Request execution scheduler

public static class
AsyncExecChain.Scope

Request execution scope that includes the unique message exchange ID, the connection route, the original request message, the execution context and the internal execution runtime.

Method Summary

Modifier and TypeMethod and Description
public void
proceed(HttpRequest
the actual request.
request
,
AsyncEntityProducer
the request entity producer or null if the request does not enclose an entity.
entityProducer
,
AsyncExecChain.Scope
the execution scope .
scope
,
AsyncExecCallback
the execution callback.
asyncExecCallback
)

Proceeds to the next element in the request execution chain.

Method Detail

proceedback to summary
public void proceed(HttpRequest request, AsyncEntityProducer entityProducer, AsyncExecChain.Scope scope, AsyncExecCallback asyncExecCallback) throws HttpException, IOException

Proceeds to the next element in the request execution chain.

Parameters
request:HttpRequest

the actual request.

entityProducer:AsyncEntityProducer

the request entity producer or null if the request does not enclose an entity.

scope:AsyncExecChain.Scope

the execution scope .

asyncExecCallback:AsyncExecCallback

the execution callback.

org.apache.hc.client5.http.async back to summary

public Interface AsyncExecChain.Scheduler


Request execution scheduler
Since
5.1

Method Summary

Modifier and TypeMethod and Description
public void
scheduleExecution(HttpRequest
the actual request.
request
,
AsyncEntityProducer
the request entity producer or null if the request does not enclose an entity.
entityProducer
,
AsyncExecChain.Scope
the execution scope.
scope
,
AsyncExecCallback
the execution callback.
asyncExecCallback
,
TimeValue
re-execution delay. Can be null if the request is to be re-executed immediately.
delay
)

Schedules request re-execution immediately or after a delay.

public default void
scheduleExecution(HttpRequest
the actual request.
request
,
AsyncEntityProducer
the request entity producer or null if the request does not enclose an entity.
entityProducer
,
AsyncExecChain.Scope
the execution scope.
scope
,
AsyncExecChain
the execution chain.
chain
,
AsyncExecCallback
the execution callback.
asyncExecCallback
,
TimeValue
re-execution delay. Can be null if the request is to be re-executed immediately.
delay
)

Schedules request re-execution of the given execution chain immediately or after a delay.

Method Detail

scheduleExecutionback to summary
public void scheduleExecution(HttpRequest request, AsyncEntityProducer entityProducer, AsyncExecChain.Scope scope, AsyncExecCallback asyncExecCallback, TimeValue delay)

Schedules request re-execution immediately or after a delay.

Parameters
request:HttpRequest

the actual request.

entityProducer:AsyncEntityProducer

the request entity producer or null if the request does not enclose an entity.

scope:AsyncExecChain.Scope

the execution scope.

asyncExecCallback:AsyncExecCallback

the execution callback.

delay:TimeValue

re-execution delay. Can be null if the request is to be re-executed immediately.

scheduleExecutionback to summary
public default void scheduleExecution(HttpRequest request, AsyncEntityProducer entityProducer, AsyncExecChain.Scope scope, AsyncExecChain chain, AsyncExecCallback asyncExecCallback, TimeValue delay)

Schedules request re-execution of the given execution chain immediately or after a delay.

Parameters
request:HttpRequest

the actual request.

entityProducer:AsyncEntityProducer

the request entity producer or null if the request does not enclose an entity.

scope:AsyncExecChain.Scope

the execution scope.

chain:AsyncExecChain

the execution chain.

asyncExecCallback:AsyncExecCallback

the execution callback.

delay:TimeValue

re-execution delay. Can be null if the request is to be re-executed immediately.

Annotations
@Internal
Since
5.3
org.apache.hc.client5.http.async back to summary

public final Class AsyncExecChain.Scope

extends Object
Class Inheritance

Request execution scope that includes the unique message exchange ID, the connection route, the original request message, the execution context and the internal execution runtime.

Field Summary

Modifier and TypeField and Description
public final CancellableDependency
public final HttpClientContext
public final String
public final AtomicInteger
public final AsyncExecRuntime
public final HttpRequest
public final HttpRoute
public final AsyncExecChain.Scheduler

Constructor Summary

AccessConstructor and Description
public
Scope(final String exchangeId, final HttpRoute route, final HttpRequest originalRequest, final CancellableDependency cancellableDependency, final HttpClientContext clientContext, final AsyncExecRuntime execRuntime, final AsyncExecChain.Scheduler scheduler, final AtomicInteger execCount)

public
Scope(final String exchangeId, final HttpRoute route, final HttpRequest originalRequest, final CancellableDependency cancellableDependency, final HttpClientContext clientContext, final AsyncExecRuntime execRuntime)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cancellableDependencyback to summary
public final CancellableDependency cancellableDependency
clientContextback to summary
public final HttpClientContext clientContext
exchangeIdback to summary
public final String exchangeId
execCountback to summary
public final AtomicInteger execCount
execRuntimeback to summary
public final AsyncExecRuntime execRuntime
originalRequestback to summary
public final HttpRequest originalRequest
routeback to summary
public final HttpRoute route
schedulerback to summary
public final AsyncExecChain.Scheduler scheduler

Constructor Detail

Scopeback to summary
public Scope(final String exchangeId, final HttpRoute route, final HttpRequest originalRequest, final CancellableDependency cancellableDependency, final HttpClientContext clientContext, final AsyncExecRuntime execRuntime, final AsyncExecChain.Scheduler scheduler, final AtomicInteger execCount)
Since
5.1
Scopeback to summary
public Scope(final String exchangeId, final HttpRoute route, final HttpRequest originalRequest, final CancellableDependency cancellableDependency, final HttpClientContext clientContext, final AsyncExecRuntime execRuntime)
Annotations
@Deprecated