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 void
execute(AsyncClientExchangeHandler exchangeHandler, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context)
Initiates a message exchange using the given handler.private IOSession
getIOSession()
boolean
isConnected()
Determines if the connection to the remote endpoint is still open and valid.void
releaseAndDiscard()
Shuts down the underlying connection and removes it from the connection pool.void
releaseAndReuse()
Releases the underlying connection back to the connection pool as re-usable.void
tlsUpgrade(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:AsyncClientEndpoint
Initiates 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:
execute
in classAsyncClientEndpoint
-
isConnected
public boolean isConnected()
Description copied from class:AsyncClientEndpoint
Determines if the connection to the remote endpoint is still open and valid.- Specified by:
isConnected
in classAsyncClientEndpoint
-
releaseAndReuse
public void releaseAndReuse()
Description copied from class:AsyncClientEndpoint
Releases the underlying connection back to the connection pool as re-usable.- Specified by:
releaseAndReuse
in classAsyncClientEndpoint
-
releaseAndDiscard
public void releaseAndDiscard()
Description copied from class:AsyncClientEndpoint
Shuts down the underlying connection and removes it from the connection pool.- Specified by:
releaseAndDiscard
in classAsyncClientEndpoint
-
tlsUpgrade
public void tlsUpgrade(NamedEndpoint endpoint, FutureCallback<ProtocolIOSession> callback)
- Specified by:
tlsUpgrade
in interfaceTlsUpgradeCapable
-
-