@Contract(threading=SAFE) public abstract class ConnectionEndpoint extends Object implements ModalCloseable
Once the endpoint is no longer needed it MUST be released with ModalCloseable.close(org.apache.hc.core5.io.CloseMode) )}.
| Modifier and Type | Class and Description |
|---|---|
static interface |
ConnectionEndpoint.RequestExecutor |
| Constructor and Description |
|---|
ConnectionEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
ClassicHttpResponse |
execute(String id,
ClassicHttpRequest request,
ConnectionEndpoint.RequestExecutor requestExecutor,
HttpContext context)
Executes HTTP request using the provided request executor.
|
abstract ClassicHttpResponse |
execute(String id,
ClassicHttpRequest request,
HttpRequestExecutor executor,
HttpContext context)
|
EndpointInfo |
getInfo()
Returns information about the endpoint or
null when not connected. |
abstract boolean |
isConnected()
Determines if the connection to the remote endpoint is still open and valid.
|
abstract void |
setSocketTimeout(Timeout timeout)
Sets the socket timeout value.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose@Deprecated public abstract ClassicHttpResponse execute(String id, ClassicHttpRequest request, HttpRequestExecutor executor, HttpContext context) throws IOException, HttpException
IOExceptionHttpExceptionpublic ClassicHttpResponse execute(String id, ClassicHttpRequest request, ConnectionEndpoint.RequestExecutor requestExecutor, HttpContext context) throws IOException, HttpException
Once the endpoint is no longer needed it MUST be released with ModalCloseable.close(org.apache.hc.core5.io.CloseMode).
id - unique operation ID or null.request - the request message.requestExecutor - the request executor.context - the execution context.IOExceptionHttpExceptionpublic abstract boolean isConnected()
public abstract void setSocketTimeout(Timeout timeout)
timeout - timeout valuepublic EndpointInfo getInfo()
null when not connected.Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.