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.String
id
private 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 void
close(org.apache.hc.core5.io.CloseMode closeMode)
(package private) org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedAsyncClientConnection>
detach()
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)
Initiates a message exchange using the given handler.java.lang.String
getId()
(package private) org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedAsyncClientConnection>
getPoolEntry()
(package private) org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedAsyncClientConnection>
getValidatedPoolEntry()
boolean
isConnected()
Determines if the connection to the remote endpoint is still open and valid.void
setSocketTimeout(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:
getId
in 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:
close
in interfaceorg.apache.hc.core5.io.ModalCloseable
-
isConnected
public boolean isConnected()
Description copied from class:AsyncConnectionEndpoint
Determines if the connection to the remote endpoint is still open and valid.- Specified by:
isConnected
in classAsyncConnectionEndpoint
-
setSocketTimeout
public void setSocketTimeout(org.apache.hc.core5.util.Timeout timeout)
Description copied from class:AsyncConnectionEndpoint
Sets socket timeout.- Specified by:
setSocketTimeout
in 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:AsyncConnectionEndpoint
Initiates a message exchange using the given handler.- Specified by:
execute
in classAsyncConnectionEndpoint
- Parameters:
exchangeId
- unique operation ID ornull
.exchangeHandler
- the message exchange handler.pushHandlerFactory
- the push handler factory.context
- the execution context.
-
-