@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)
)}.
Modifier and Type | Class and Description |
---|---|
static interface |
ConnectionEndpoint.RequestExecutor |
Constructor and Description |
---|
ConnectionEndpoint() |
Modifier and Type | Method and Description |
---|---|
org.apache.hc.core5.http.ClassicHttpResponse |
execute(String id,
org.apache.hc.core5.http.ClassicHttpRequest request,
ConnectionEndpoint.RequestExecutor requestExecutor,
org.apache.hc.core5.http.protocol.HttpContext context)
Executes HTTP request using the provided request executor.
|
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)
|
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(org.apache.hc.core5.util.Timeout timeout)
Sets the socket timeout value.
|
@Deprecated 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
IOException
org.apache.hc.core5.http.HttpException
public org.apache.hc.core5.http.ClassicHttpResponse execute(String id, org.apache.hc.core5.http.ClassicHttpRequest request, ConnectionEndpoint.RequestExecutor requestExecutor, 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.requestExecutor
- 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 valuepublic EndpointInfo getInfo()
null
when not connected.Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.