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:
java.io.Closeable,java.lang.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
Fields Modifier and Type Field Description private java.lang.Stringidprivate java.util.concurrent.atomic.AtomicReference<org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedHttpClientConnection>>poolEntryRef
-
Constructor Summary
Constructors Constructor Description InternalConnectionEndpoint(org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedHttpClientConnection> poolEntry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidclose(org.apache.hc.core5.io.CloseMode closeMode)(package private) org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedHttpClientConnection>detach()org.apache.hc.core5.http.ClassicHttpResponseexecute(java.lang.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.java.lang.StringgetId()(package private) org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedHttpClientConnection>getPoolEntry()(package private) org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedHttpClientConnection>getValidatedPoolEntry()booleanisConnected()Determines if the connection to the remote endpoint is still open and valid.voidsetSocketTimeout(org.apache.hc.core5.util.Timeout timeout)Sets the socket timeout value.
-
-
-
Field Detail
-
poolEntryRef
private final java.util.concurrent.atomic.AtomicReference<org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedHttpClientConnection>> poolEntryRef
-
id
private final java.lang.String id
-
-
Constructor Detail
-
InternalConnectionEndpoint
InternalConnectionEndpoint(org.apache.hc.core5.pool.PoolEntry<HttpRoute,ManagedHttpClientConnection> 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,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:
closein interfaceorg.apache.hc.core5.io.ModalCloseable
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
isConnected
public boolean isConnected()
Description copied from class:ConnectionEndpointDetermines if the connection to the remote endpoint is still open and valid.- Specified by:
isConnectedin classConnectionEndpoint
-
setSocketTimeout
public void setSocketTimeout(org.apache.hc.core5.util.Timeout timeout)
Description copied from class:ConnectionEndpointSets the socket timeout value.- Specified by:
setSocketTimeoutin classConnectionEndpoint- Parameters:
timeout- timeout value
-
execute
public org.apache.hc.core5.http.ClassicHttpResponse execute(java.lang.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 java.io.IOException, org.apache.hc.core5.http.HttpExceptionDescription copied from class:ConnectionEndpointExecutes 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:
executein classConnectionEndpoint- Parameters:
exchangeId- unique operation ID ornull.request- the request message.requestExecutor- the request executor.context- the execution context.- Throws:
java.io.IOExceptionorg.apache.hc.core5.http.HttpException
-
-