@Contract(threading=SAFE) public abstract class ConnectionEndpoint extends Object implements org.apache.hc.core5.io.ModalCloseable
Once the endpoint is no longer needed it MUST be released with ModalCloseable.close(org.apache.hc.core5.io.CloseMode)
)}.
Constructor and Description |
---|
ConnectionEndpoint() |
Modifier and Type | Method and Description |
---|---|
abstract org.apache.hc.core5.http.ClassicHttpResponse |
execute(String id,
org.apache.hc.core5.http.ClassicHttpRequest request,
org.apache.hc.core5.http.impl.io.HttpRequestExecutor executor,
org.apache.hc.core5.http.protocol.HttpContext context)
Executes HTTP request using the provided request executor.
|
abstract boolean |
isConnected()
Determines if the connection to the remote endpoint is still open and valid.
|
abstract void |
setSocketTimeout(org.apache.hc.core5.util.Timeout timeout)
Sets the socket timeout value.
|
public abstract org.apache.hc.core5.http.ClassicHttpResponse execute(String id, org.apache.hc.core5.http.ClassicHttpRequest request, org.apache.hc.core5.http.impl.io.HttpRequestExecutor executor, org.apache.hc.core5.http.protocol.HttpContext context) throws IOException, org.apache.hc.core5.http.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.executor
- the request executor.context
- the execution context.IOException
org.apache.hc.core5.http.HttpException
public abstract boolean isConnected()
public abstract void setSocketTimeout(org.apache.hc.core5.util.Timeout timeout)
timeout
- timeout valueCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.