Class HttpAsyncRequester.InternalAsyncClientEndpoint
- java.lang.Object
-
- org.apache.hc.core5.http.nio.AsyncClientEndpoint
-
- org.apache.hc.core5.http.impl.bootstrap.HttpAsyncRequester.InternalAsyncClientEndpoint
-
- All Implemented Interfaces:
TlsUpgradeCapable
- Enclosing class:
- HttpAsyncRequester
private class HttpAsyncRequester.InternalAsyncClientEndpoint extends AsyncClientEndpoint implements TlsUpgradeCapable
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.concurrent.atomic.AtomicReference<PoolEntry<HttpHost,IOSession>>poolEntryRef
-
Constructor Summary
Constructors Constructor Description InternalAsyncClientEndpoint(PoolEntry<HttpHost,IOSession> poolEntry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(AsyncClientExchangeHandler exchangeHandler, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context)Initiates a message exchange using the given handler.private IOSessiongetIOSession()booleanisConnected()Determines if the connection to the remote endpoint is still open and valid.voidreleaseAndDiscard()Shuts down the underlying connection and removes it from the connection pool.voidreleaseAndReuse()Releases the underlying connection back to the connection pool as re-usable.voidtlsUpgrade(NamedEndpoint endpoint, FutureCallback<ProtocolIOSession> callback)-
Methods inherited from class org.apache.hc.core5.http.nio.AsyncClientEndpoint
execute, execute, execute, execute
-
-
-
-
Method Detail
-
getIOSession
private IOSession getIOSession()
-
execute
public void execute(AsyncClientExchangeHandler exchangeHandler, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context)
Description copied from class:AsyncClientEndpointInitiates a message exchange using the given handler.Once the endpoint is no longer needed it MUST be released with
AsyncClientEndpoint.releaseAndReuse()orAsyncClientEndpoint.releaseAndDiscard().- Specified by:
executein classAsyncClientEndpoint
-
isConnected
public boolean isConnected()
Description copied from class:AsyncClientEndpointDetermines if the connection to the remote endpoint is still open and valid.- Specified by:
isConnectedin classAsyncClientEndpoint
-
releaseAndReuse
public void releaseAndReuse()
Description copied from class:AsyncClientEndpointReleases the underlying connection back to the connection pool as re-usable.- Specified by:
releaseAndReusein classAsyncClientEndpoint
-
releaseAndDiscard
public void releaseAndDiscard()
Description copied from class:AsyncClientEndpointShuts down the underlying connection and removes it from the connection pool.- Specified by:
releaseAndDiscardin classAsyncClientEndpoint
-
tlsUpgrade
public void tlsUpgrade(NamedEndpoint endpoint, FutureCallback<ProtocolIOSession> callback)
- Specified by:
tlsUpgradein interfaceTlsUpgradeCapable
-
-