Class BasicHttpClientConnectionManager.InternalConnectionEndpoint
- java.lang.Object
-
- org.apache.hc.client5.http.io.ConnectionEndpoint
-
- org.apache.hc.client5.http.impl.io.BasicHttpClientConnectionManager.InternalConnectionEndpoint
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,org.apache.hc.core5.io.ModalCloseable
- Enclosing class:
- BasicHttpClientConnectionManager
class BasicHttpClientConnectionManager.InternalConnectionEndpoint extends ConnectionEndpoint
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicReference<ManagedHttpClientConnection>
connRef
private HttpRoute
route
-
Constructor Summary
Constructors Constructor Description InternalConnectionEndpoint(HttpRoute route, ManagedHttpClientConnection conn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
close(org.apache.hc.core5.io.CloseMode closeMode)
(package private) ManagedHttpClientConnection
detach()
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)
Executes HTTP request using the provided request executor.(package private) ManagedHttpClientConnection
getConnection()
(package private) HttpRoute
getRoute()
(package private) ManagedHttpClientConnection
getValidatedConnection()
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 the socket timeout value.
-
-
-
Field Detail
-
route
private final HttpRoute route
-
connRef
private final java.util.concurrent.atomic.AtomicReference<ManagedHttpClientConnection> connRef
-
-
Constructor Detail
-
InternalConnectionEndpoint
public InternalConnectionEndpoint(HttpRoute route, ManagedHttpClientConnection conn)
-
-
Method Detail
-
getRoute
HttpRoute getRoute()
-
getConnection
ManagedHttpClientConnection getConnection()
-
getValidatedConnection
ManagedHttpClientConnection getValidatedConnection()
-
detach
ManagedHttpClientConnection detach()
-
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
-
close
public void close(org.apache.hc.core5.io.CloseMode closeMode)
-
close
public void close() throws java.io.IOException
- Throws:
java.io.IOException
-
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(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.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:
java.io.IOException
org.apache.hc.core5.http.HttpException
-
-