Top Description Constructors Methods
org.apache.hc.core5.http.nio

public abstract Class AsyncClientEndpoint

extends Object
Class Inheritance
Known Direct Subclasses
org.apache.hc.core5.http.impl.bootstrap.HttpAsyncRequester.InternalAsyncClientEndpoint
Annotations
@Contract
threading:SAFE
Imports
java.util.concurrent.Future, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.concurrent.BasicFuture, .FutureCallback, .FutureContribution, org.apache.hc.core5.http.nio.support.BasicClientExchangeHandler, org.apache.hc.core5.http.protocol.HttpContext, .HttpCoreContext

Client endpoint leased from a connection manager.

Once the endpoint is no longer needed it MUST be released with releaseAndReuse() or releaseAndDiscard().

Since
5.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract void
execute(AsyncClientExchangeHandler exchangeHandler, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context)

Initiates a message exchange using the given handler.

public void
execute(final AsyncClientExchangeHandler exchangeHandler, final HttpContext context)

Initiates a message exchange using the given handler.

public final <T> Future<T>
execute(final AsyncRequestProducer requestProducer, final AsyncResponseConsumer<T> responseConsumer, final HandlerFactory<AsyncPushConsumer> pushHandlerFactory, final HttpContext context, final FutureCallback<T> callback)

Initiates message exchange using the given request producer and response consumer.

public final <T> Future<T>
execute(final AsyncRequestProducer requestProducer, final AsyncResponseConsumer<T> responseConsumer, final HttpContext context, final FutureCallback<T> callback)

Initiates message exchange using the given request producer and response consumer.

public final <T> Future<T>
execute(final AsyncRequestProducer requestProducer, final AsyncResponseConsumer<T> responseConsumer, final FutureCallback<T> callback)

Initiates a message exchange using the given request producer and response consumer.

public abstract boolean
isConnected()

Determines if the connection to the remote endpoint is still open and valid.

public abstract void
releaseAndDiscard()

Shuts down the underlying connection and removes it from the connection pool.

public abstract void
releaseAndReuse()

Releases the underlying connection back to the connection pool as re-usable.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AsyncClientEndpointback to summary
public AsyncClientEndpoint()

Method Detail

executeback to summary
public abstract void execute(AsyncClientExchangeHandler exchangeHandler, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context)

Initiates a message exchange using the given handler.

Once the endpoint is no longer needed it MUST be released with releaseAndReuse() or releaseAndDiscard().

executeback to summary
public void execute(final AsyncClientExchangeHandler exchangeHandler, final HttpContext context)

Initiates a message exchange using the given handler.

Once the endpoint is no longer needed it MUST be released with releaseAndReuse() or releaseAndDiscard().

executeback to summary
public final <T> Future<T> execute(final AsyncRequestProducer requestProducer, final AsyncResponseConsumer<T> responseConsumer, final HandlerFactory<AsyncPushConsumer> pushHandlerFactory, final HttpContext context, final FutureCallback<T> callback)

Initiates message exchange using the given request producer and response consumer.

Once the endpoint is no longer needed it MUST be released with releaseAndReuse() or releaseAndDiscard().

executeback to summary
public final <T> Future<T> execute(final AsyncRequestProducer requestProducer, final AsyncResponseConsumer<T> responseConsumer, final HttpContext context, final FutureCallback<T> callback)

Initiates message exchange using the given request producer and response consumer.

Once the endpoint is no longer needed it MUST be released with releaseAndReuse() or releaseAndDiscard().

executeback to summary
public final <T> Future<T> execute(final AsyncRequestProducer requestProducer, final AsyncResponseConsumer<T> responseConsumer, final FutureCallback<T> callback)

Initiates a message exchange using the given request producer and response consumer.

Once the endpoint is no longer needed it MUST be released with releaseAndReuse() or releaseAndDiscard().

isConnectedback to summary
public abstract boolean isConnected()

Determines if the connection to the remote endpoint is still open and valid.

releaseAndDiscardback to summary
public abstract void releaseAndDiscard()

Shuts down the underlying connection and removes it from the connection pool.

releaseAndReuseback to summary
public abstract void releaseAndReuse()

Releases the underlying connection back to the connection pool as re-usable.