Class PoolingAsyncClientConnectionManager.InternalConnectionEndpoint
- java.lang.Object
-
- org.apache.hc.client5.http.nio.AsyncConnectionEndpoint
-
- org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager.InternalConnectionEndpoint
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.apache.hc.core5.io.ModalCloseable,org.apache.hc.core5.util.Identifiable
- Enclosing class:
- PoolingAsyncClientConnectionManager
static class PoolingAsyncClientConnectionManager.InternalConnectionEndpoint extends AsyncConnectionEndpoint implements org.apache.hc.core5.util.Identifiable
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringidprivate java.util.concurrent.atomic.AtomicReference<org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedAsyncClientConnection>>poolEntryRef
-
Constructor Summary
Constructors Constructor Description InternalConnectionEndpoint(org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedAsyncClientConnection> poolEntry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose(org.apache.hc.core5.io.CloseMode closeMode)(package private) org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedAsyncClientConnection>detach()voidexecute(java.lang.String exchangeId, org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.http.protocol.HttpContext context)Initiates a message exchange using the given handler.java.lang.StringgetId()(package private) org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedAsyncClientConnection>getPoolEntry()(package private) org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedAsyncClientConnection>getValidatedPoolEntry()booleanisConnected()Determines if the connection to the remote endpoint is still open and valid.voidsetSocketTimeout(org.apache.hc.core5.util.Timeout timeout)Sets socket timeout.
-
-
-
Field Detail
-
poolEntryRef
private final java.util.concurrent.atomic.AtomicReference<org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedAsyncClientConnection>> poolEntryRef
-
id
private final java.lang.String id
-
-
Constructor Detail
-
InternalConnectionEndpoint
InternalConnectionEndpoint(org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedAsyncClientConnection> poolEntry)
-
-
Method Detail
-
getId
public java.lang.String getId()
- Specified by:
getIdin interfaceorg.apache.hc.core5.util.Identifiable
-
getPoolEntry
org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedAsyncClientConnection> getPoolEntry()
-
getValidatedPoolEntry
org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedAsyncClientConnection> getValidatedPoolEntry()
-
detach
org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedAsyncClientConnection> detach()
-
close
public void close(org.apache.hc.core5.io.CloseMode closeMode)
- Specified by:
closein interfaceorg.apache.hc.core5.io.ModalCloseable
-
isConnected
public boolean isConnected()
Description copied from class:AsyncConnectionEndpointDetermines if the connection to the remote endpoint is still open and valid.- Specified by:
isConnectedin classAsyncConnectionEndpoint
-
setSocketTimeout
public void setSocketTimeout(org.apache.hc.core5.util.Timeout timeout)
Description copied from class:AsyncConnectionEndpointSets socket timeout.- Specified by:
setSocketTimeoutin classAsyncConnectionEndpoint- Parameters:
timeout- the socket timeout.
-
execute
public void execute(java.lang.String exchangeId, org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.http.protocol.HttpContext context)Description copied from class:AsyncConnectionEndpointInitiates a message exchange using the given handler.- Specified by:
executein classAsyncConnectionEndpoint- Parameters:
exchangeId- unique operation ID ornull.exchangeHandler- the message exchange handler.pushHandlerFactory- the push handler factory.context- the execution context.
-
-