Class PoolingHttpClientConnectionManager.InternalConnectionEndpoint
java.lang.Object
org.apache.hc.client5.http.io.ConnectionEndpoint
org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.InternalConnectionEndpoint
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.hc.core5.io.ModalCloseable
,org.apache.hc.core5.util.Identifiable
- Enclosing class:
PoolingHttpClientConnectionManager
static class PoolingHttpClientConnectionManager.InternalConnectionEndpoint
extends ConnectionEndpoint
implements org.apache.hc.core5.util.Identifiable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final AtomicReference
<org.apache.hc.core5.pool.PoolEntry<HttpRoute, ManagedHttpClientConnection>> -
Constructor Summary
ConstructorsConstructorDescriptionInternalConnectionEndpoint
(org.apache.hc.core5.pool.PoolEntry<HttpRoute, ManagedHttpClientConnection> poolEntry) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
close
(org.apache.hc.core5.io.CloseMode closeMode) (package private) org.apache.hc.core5.pool.PoolEntry
<HttpRoute, ManagedHttpClientConnection> detach()
org.apache.hc.core5.http.ClassicHttpResponse
execute
(String exchangeId, org.apache.hc.core5.http.ClassicHttpRequest request, org.apache.hc.core5.http.impl.io.HttpRequestExecutor requestExecutor, org.apache.hc.core5.http.protocol.HttpContext context) Executes HTTP request using the provided request executor.getId()
(package private) org.apache.hc.core5.pool.PoolEntry
<HttpRoute, ManagedHttpClientConnection> (package private) org.apache.hc.core5.pool.PoolEntry
<HttpRoute, ManagedHttpClientConnection> boolean
Determines if the connection to the remote endpoint is still open and valid.void
setSocketTimeout
(org.apache.hc.core5.util.Timeout timeout) Sets the socket timeout value.
-
Field Details
-
poolEntryRef
private final AtomicReference<org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedHttpClientConnection>> poolEntryRef -
id
-
-
Constructor Details
-
InternalConnectionEndpoint
InternalConnectionEndpoint(org.apache.hc.core5.pool.PoolEntry<HttpRoute, ManagedHttpClientConnection> poolEntry)
-
-
Method Details
-
getId
- Specified by:
getId
in interfaceorg.apache.hc.core5.util.Identifiable
-
getPoolEntry
org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedHttpClientConnection> getPoolEntry() -
getValidatedPoolEntry
org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedHttpClientConnection> getValidatedPoolEntry() -
detach
org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedHttpClientConnection> detach() -
close
public void close(org.apache.hc.core5.io.CloseMode closeMode) - Specified by:
close
in interfaceorg.apache.hc.core5.io.ModalCloseable
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
isConnected
public boolean isConnected()Description copied from class:ConnectionEndpoint
Determines if the connection to the remote endpoint is still open and valid.- Specified by:
isConnected
in classConnectionEndpoint
-
setSocketTimeout
public void setSocketTimeout(org.apache.hc.core5.util.Timeout timeout) Description copied from class:ConnectionEndpoint
Sets the socket timeout value.- Specified by:
setSocketTimeout
in classConnectionEndpoint
- Parameters:
timeout
- timeout value
-
execute
public org.apache.hc.core5.http.ClassicHttpResponse execute(String exchangeId, org.apache.hc.core5.http.ClassicHttpRequest request, org.apache.hc.core5.http.impl.io.HttpRequestExecutor requestExecutor, org.apache.hc.core5.http.protocol.HttpContext context) throws IOException, org.apache.hc.core5.http.HttpException Description copied from class:ConnectionEndpoint
Executes HTTP request using the provided request executor.Once the endpoint is no longer needed it MUST be released with
ModalCloseable.close(org.apache.hc.core5.io.CloseMode)
.- Specified by:
execute
in classConnectionEndpoint
- Parameters:
exchangeId
- unique operation ID ornull
.request
- the request message.requestExecutor
- the request executor.context
- the execution context.- Throws:
IOException
org.apache.hc.core5.http.HttpException
-