@Internal
public interface AsyncExecRuntime
This interface is considered internal and generally ought not be used or accessed by custom request exec handlers.
| Modifier and Type | Method and Description | 
|---|---|
| org.apache.hc.core5.concurrent.Cancellable | acquireEndpoint(String id,
               HttpRoute route,
               Object state,
               HttpClientContext context,
               org.apache.hc.core5.concurrent.FutureCallback<AsyncExecRuntime> callback)Initiates operation to acquire a connection endpoint. | 
| org.apache.hc.core5.concurrent.Cancellable | connectEndpoint(HttpClientContext context,
               org.apache.hc.core5.concurrent.FutureCallback<AsyncExecRuntime> callback)Initiates operation to connect the local endpoint to the initial hop (connection
 target in case of a direct route or to the first proxy hop in case of a route
 via a proxy or multiple proxies). | 
| void | discardEndpoint()Shuts down and discards the acquired endpoint. | 
| org.apache.hc.core5.concurrent.Cancellable | execute(String id,
       org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler,
       HttpClientContext context)Initiates a message exchange using the given handler. | 
| AsyncExecRuntime | fork()Forks this runtime for parallel execution. | 
| boolean | isEndpointAcquired()Determines of a connection endpoint has been acquired. | 
| boolean | isEndpointConnected()Determines of there the endpoint is connected to the initial hop (connection target
 in case of a direct route or to the first proxy hop in case of a route via a proxy
 or multiple proxies). | 
| void | markConnectionNonReusable()Marks the connection as non re-usable. | 
| void | markConnectionReusable(Object state,
                      org.apache.hc.core5.util.TimeValue validityTime)Marks the connection as potentially re-usable for the given period of time
 and also marks it as stateful if the state representation is given. | 
| void | releaseEndpoint()Releases the acquired endpoint potentially making it available for re-use. | 
| void | upgradeTls(HttpClientContext context)Upgrades transport security of the active connection by using the TLS security protocol. | 
| boolean | validateConnection()Validates the connection making sure it can be used to execute requests. | 
boolean isEndpointAcquired()
true if an endpoint has been acquired, false otherwise.org.apache.hc.core5.concurrent.Cancellable acquireEndpoint(String id, HttpRoute route, Object state, HttpClientContext context, org.apache.hc.core5.concurrent.FutureCallback<AsyncExecRuntime> callback)
id - unique operation ID or null.route - the connection route.state - the expected connection state. May be null if connection
              can be state-less or its state is irrelevant.context - the execution context.callback - the result callback.void releaseEndpoint()
void discardEndpoint()
boolean isEndpointConnected()
true if the endpoint is connected, false otherwise.org.apache.hc.core5.concurrent.Cancellable connectEndpoint(HttpClientContext context, org.apache.hc.core5.concurrent.FutureCallback<AsyncExecRuntime> callback)
context - the execution context.callback - the result callback.void upgradeTls(HttpClientContext context)
context - the execution context.boolean validateConnection()
true if the connection is valid, false.org.apache.hc.core5.concurrent.Cancellable execute(String id, org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, HttpClientContext context)
id - unique operation ID or null.exchangeHandler - the client message handler.context - the execution context.void markConnectionReusable(Object state, org.apache.hc.core5.util.TimeValue validityTime)
state - the connection state representation or null if stateless.validityTime - the period of time this connection is valid for.void markConnectionNonReusable()
AsyncExecRuntime fork()
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.